Devel::ModInfo::ParamHashRef - Defines a hash reference of parameters expected by a function, method, or constructor
Not meant to be used outside the ModInfo system.
Devel::ModInfo::ParamHashRef defines a hash reference which contains a collection of key/value pairs that should be passed into a method, function, or constructor. The key/value pairs are defined by instances of the Devel::ModInfo::ParamHash::Key class.
The ParamHashRef describes a common Perl construct in which a Perl hash reference is used to provide parameters to a function. It often looks like the following:
sub mysub { my ($self, $params) = @_; unlink($params->{file_name}); #Do other stuff }
The hash reference named $params will have all the key/value pairs passed into the function. This method emulates what is called "named parameters" in some other languages. In these constructs, the order of the parameters does not matter, as the name of each parameter, rather than its position, determines how the value is applied.
jtillman@bigfoot.com
tcushard@bigfoot.com
Devel::ModInfo::Tutorial
Devel::ModInfo::ParamHash::Key
perl(1)
To install Devel::ModInfo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::ModInfo
CPAN shell
perl -MCPAN -e shell install Devel::ModInfo
For more information on module installation, please visit the detailed CPAN module installation guide.