Venus::Core::Class - Class Base Class
Class Base Class for Perl 5
package User; use base 'Venus::Core::Class'; package main; my $user = User->new( fname => 'Elliot', lname => 'Alderson', ); # bless({fname => 'Elliot', lname => 'Alderson'}, 'User')
This package provides a class base class with class building and object construction lifecycle hooks.
This package inherits behaviors from:
Venus::Core
This package provides the following methods:
does(Str $name) (Bool)
The does method returns true if the object is composed of the role provided.
Since 1.00
1.00
# given: synopsis my $does = $user->does('Identity'); # 0
meta() (Meta)
The meta method returns a Venus::Meta objects which describes the package's configuration.
package main; my $user = User->new( fname => 'Elliot', lname => 'Alderson', ); my $meta = $user->meta; # bless({...}, 'Venus::Meta')
new(Any %args | HashRef $args) (Object)
The new method instantiates the class and returns a new object.
package main; my $user = User->new( fname => 'Elliot', lname => 'Alderson', ); # bless({fname => 'Elliot', lname => 'Alderson'}, 'User')
package main; my $user = User->new({ fname => 'Elliot', lname => 'Alderson', }); # bless({fname => 'Elliot', lname => 'Alderson'}, 'User')
To install Venus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Venus
CPAN shell
perl -MCPAN -e shell install Venus
For more information on module installation, please visit the detailed CPAN module installation guide.