Mars - OO Framework
OO Framework for Perl 5
0.05
package User; use Mars::Class; attr 'fname'; attr 'lname'; attr 'email'; attr 'trust'; sub BUILD { shift->{trust} = true; } package main; my $user = User->new( fname => 'Elliot', lname => 'Alderson', ); # bless({ # 'fname' => 'Elliot', # 'lname' => 'Alderson', # 'trust' => 1 # }, 'User')
Mars is a simple yet powerful framework for object-oriented programming which lets you hook into all aspects of the "class", "role", "interface", and object "lifecycle", from class declaration and object "construction", to object "deconstruction".
This package provides the following functions:
false() (Bool)
The false function returns a falsy boolean value which is designed to be practically indistinguishable from the conventional numerical 0 value. This function is always exported unless a routine of the same name already exists.
0
Since 0.01
0.01
package main; use Mars; my $false = false; # 0
package main; use Mars; my $true = !false; # 1
true() (Bool)
The true function returns a truthy boolean value which is designed to be practically indistinguishable from the conventional numerical 1 value. This function is always exported unless a routine of the same name already exists.
1
package main; use Mars; my $true = true; # 1
package main; use Mars; my $false = !true; # 0
Awncorp, awncorp@cpan.org
awncorp@cpan.org
To install Mars, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mars
CPAN shell
perl -MCPAN -e shell install Mars
For more information on module installation, please visit the detailed CPAN module installation guide.