Devel::ModInfo::ParamHash

Devel::ModInfo::ParamHash - Defines a hash of parameters expected by a function, method, or constructor

SYNOPSIS

Not meant to be used outside the ModInfo system.

DESCRIPTION

Devel::ModInfo::ParamHash is 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 ParamHash describes a common Perl construct in which a Perl hash is used to provide parameters to a function. It often looks like the following:

sub mysub { my ($self, %params) = @_; #Do stuff }

The hash 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.

AUTHOR

jtillman@bigfoot.com

tcushard@bigfoot.com

SEE ALSO

Devel::ModInfo::Tutorial

Devel::ModInfo::ParamHash::Key

perl(1)