Module::API::Base - providing common methods to the Module::API modules.
my $object = $class->new( foo => 'bar' );
Creates a new object with the values passed set to the config. Extra fields can be permitted using _extra_config_fields. See below.
_extra_config_fields
$config_hashref = $api_object->config; $field_value = $api_object->config('field'); $new_field_value = $api_object->config( 'field', $value );
A somewhat magical method - returns the config hashref if called without any arguments, returns the value of the field if called with a field name or if called with two args sets the value and then returns new value.
$self = $class->_base_object;
Returns a hashref that all other Module::API::* objects can be built on top of.
To install Module::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::API
CPAN shell
perl -MCPAN -e shell install Module::API
For more information on module installation, please visit the detailed CPAN module installation guide.