- added 'find' function to Class::Maker::Reflection find (Returns a snapshot-aref to all instances (objects) of a class in a given package)
0.05_06 21.07.2002 00:35
- class field 'default' is working now #!perl Class::Maker::class { isa => [qw( Something )], public => { string => [qw( name desc )], }, default => { name => 'Role Name', desc => 'Role Descrition', xxx => 'DEFAULTS TO XXX', }, }; my $role = Human::Role->new( ); __END__ Even we called an empty 'new' we got $role->name eq 'Role Name' $role->desc eq 'Role Description' and Something->xxx( 'DEFAULTS TO XXX' ) is called which may be an accessor or a function/method that does anything. - Class::Maker::Reflection::reflect() now returns all reflections of the @ISA classes as a href. This will be a ie. "Class::Maker::Reflex" object in future. Also it better sync's the ->{isa} class fields with the real @ISA. Additionally non Class::Maker classes can be introspected, so they will have at least information in the 'isa' and 'methods' fields. { package Human::Role::Simple; @ISA = qw(Human::Role); sub new : method { my $this = shift; return $this->SUPER::new( name => $_[0] ); } } $reflex = ( 'Human::Role::Simple' => { 'isa' => [ 'Human::Role' ], 'methods' => [ 'new' ]. } )
0.05_09 27.07.2002 10:40
- attribute handlers (accessors) are now in "Class::Maker::Basic::Handler::Attributes". Therefore if new accessors types are into that package (see _make_method in Maker.pm). - 'attribute' field is now obsolete ! Now only private/public/protected are allowed.
0.05_10 01.09.2002 16:14
- Class::Maker::Basic::Constructor new() supports cloning (use args for clone modification). $new_obj = Pkg::Name->new( name => 'name', email => 'email@server.org' ); $clone_obj = $new_obj->new( name => 'othername' );
0.05_12 29.9.2002 18:53
- Added explicitly use attributes; to Maker.pm because under perl5.8.0 it seems to be needed.
0.5.14
- Class::Maker::Exception added. See pod.
To install Class::Maker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Maker
CPAN shell
perl -MCPAN -e shell install Class::Maker
For more information on module installation, please visit the detailed CPAN module installation guide.