AutoCode::AccessorMaker -- making the accessors in the traditional way.
use AutoCode::AccessMaker ( '$' => [qw(first_name sex)], '@' => ['alias', ['child', 'children'] ); AutoCode::AccessorMaker->make_scalar_accessor('last_name', __PACKAGE__); # If the second argument is omitted, the caller is regarded as default AutoCode::AccessorMaker->make_array_accessor([qw(child children)]);
This module is to save the developers to type the same code of accessor day in and day out.
There are two non-exclusive ways to generate the accessors for a module.
'import' method is special for Perl module. It is called when the module get used, like Exporter. And the arguments listed behind the module name are passed into import method.
This import method requests a hash with limited keys as '$', '@'. The values in the argument hash are the array reference.
Juguang Xiao, juguang at tll.org.sg
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install AutoCode::Root, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AutoCode::Root
CPAN shell
perl -MCPAN -e shell install AutoCode::Root
For more information on module installation, please visit the detailed CPAN module installation guide.