p5-MooseX-Role-Parameterized-1.02p1 – roles with composition parameters


Your parameterized role consists of two new things: parameter
declarations and a role block. Parameters are declared using the
"parameter" keyword which very much resembles "has" in Moose. You can
use any option that "has" in Moose accepts. The default value for the is
option is ro as that's a very common case. Use is => 'bare' if you want
no accessor. These parameters will get their values when the consuming
class (or role) uses "with" in Moose. A parameter object will be
constructed with these values, and passed to the role block.

There are many possible implementations for parameterized roles
(hopefully with a consistent enough API).

WWW: http://search.cpan.org/dist/MooseX-Role-Parameterized/

devel perl5

Library dependencies


Build dependencies


Run dependencies