Data::Object::Base::Code
Data-Object Abstract Code Class
package My::Code; use parent 'Data::Object::Base::Code'; my $code = My::Code->new(sub { shift + 1 });
Data::Object::Base::Code provides routines for operating on Perl 5 code references.
This package implements the following methods.
new(CodeRef $arg1) : Object
The new method expects a code reference and returns a new class instance.
# given sub { shift + 1 } my $code = Data::Object::Base::Code->new(sub { shift + 1 });
To install Data::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object
CPAN shell
perl -MCPAN -e shell install Data::Object
For more information on module installation, please visit the detailed CPAN module installation guide.