Venus::Core::Mixin - Mixin Base Class
Mixin Base Class for Perl 5
package Person; use base 'Venus::Core::Mixin'; package User; use base 'Venus::Core::Class'; package main; my $user = User->MIXIN('Person')->new( fname => 'Elliot', lname => 'Alderson', ); # bless({fname => 'Elliot', lname => 'Alderson'}, 'User')
This package provides a mixin base class with mixin 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.02
1.02
package Employee; use base 'Venus::Core::Role'; Employee->MIXIN('Person'); package main; my $user = User->ROLE('Employee')->new( fname => 'Elliot', lname => 'Alderson', ); my $does = $user->does('Employee'); # 1
meta() (Meta)
The meta method returns a Venus::Meta objects which describes the package's configuration.
package main; my $user = User->ROLE('Person')->new( fname => 'Elliot', lname => 'Alderson', ); my $meta = Person->meta; # bless({...}, 'Venus::Meta')
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.