MooseX::Role::Parameterized::Meta::Role::Parameterizable - metaclass for parameterizable roles
This is the metaclass for parameterizable roles, roles that have their parameters currently unbound. These are the roles that you use "with" in Moose, but instead of composing the parameterizable role, we construct a new parameterized role (MooseX::Role::Parameterized::Meta::Role::Parameterized).
The name of the class that will be used to construct the parameters object.
A metaclass representing this roles's parameters. It will be an anonymous subclass of "parameters_class". Each call to "parameter" in MooseX::Role::Parameters adds an attribute to this metaclass.
When this role is consumed, the parameters object will be instantiated using this metaclass.
A code reference that is used to generate a role based on the parameters provided by the consumer. The user usually specifies it using the "role" in MooseX::Role::Parameterized keyword.
Basically delegates to "add_attribute" in Moose::Meta::Class on the "parameters_metaclass" but with error messages that refer to a "parameter" not an "attribute".
Creates a new MooseX::Role::Parameterized::Parameters object using metaclass "parameters_metaclass".
The arguments are those specified by the consumer as parameter values.
Returns a new instance of MooseX::Role::Parameterized::Meta::Role::Parameterized based on the arguments. The arguments are a hash reference of parameters and, if available, a consumer metaobject.
parameters
consumer
Overrides "apply" in Moose::Meta::Role to automatically generate the parameterized role.
To install MooseX::Role::Parameterized, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Role::Parameterized
CPAN shell
perl -MCPAN -e shell install MooseX::Role::Parameterized
For more information on module installation, please visit the detailed CPAN module installation guide.