MooX::Role::Parameterized:With - dsl to apply roles with composition parameters
package FooWith; use Moo; use MooX::Role::Parameterized::With; # overrides Moo::with with "Bar" => { # apply parameterized role Bar once attr => 'baz', method => 'run' }, "Other::Role" => [ # apply parameterized role "Other::Role" twice { ... }, # with different parameters { ... }, ], "Other::Role" => { ...}, # apply it again "Some::Moo::Role", "Some::Role::Tiny"; has foo => ( is => 'ro'); # continue with normal Moo code
This experimental package try to offer an easy way to add parametrized roles.
Will load and apply MooX::Roles::Parameterized roles, just need use this package with a hash of role => parameters.
Tiago Peczenyj <tiago (dot) peczenyj (at) gmail (dot) com>
Please report any bugs or feature requests on the bugtracker website
To install MooX::Role::Parameterized, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooX::Role::Parameterized
CPAN shell
perl -MCPAN -e shell install MooX::Role::Parameterized
For more information on module installation, please visit the detailed CPAN module installation guide.