[Catalyst] Applying parameterized roles to Catalyst controllers

Oliver Charles oliver.g.charles at googlemail.com
Fri Jan 8 17:58:54 GMT 2010


I've asked this question a few times, but never got far enough to
actually solve the problem. So, instead of asking on IRC again and
losing the logs/forgetting stuff, I'm going to try here!

I have a role that needs to be parameterized before it is applied to
my controller. However, Catalyst controllers seem to require that all
methods consume the MooseX::MethodAttributes role meta.
MooseX::Role::Parameterized doesn't seem to allow me to apply another
metaclass or traits.

So, does anyone have any way I might go about doing this? I thought
about patching MX::R::P to allow me to specific extra traits, like
Moose::Role. That would give something like~

    use MooseX::Role::Parameterized -traits => [
'MooseX::MethodAttributes::Meta::Role' ]

    Oliver Charles / aCiD2

More information about the Catalyst mailing list