I have been informed of the existance of MooseX::Traits, which does exactly this. In light of this, MooseX::Role::ConstructorRoleApplication is going to unceremoniously depart from this world.
Sorry for the noise. Frase On Mon, May 23, 2011 at 09:35:34PM +1000, Fraser Tweedale wrote: > Prior to namespace registration, running this by modules@ > > A role which, when applied to a Moose class, allows additional roles to > be applied to objects of that class via a constructor argument. > > SYNOPSIS > > package Foo; > use Moose; > with 'MooseX::Role::ConstructorRoleApplication'; > > # construct a Foo that also does My::Role and My::OtherRole > my $foo = Foo->new(apply => ['My::Role', 'My::OtherRole']);
pgpPcXp189cby.pgp
Description: PGP signature
