From: Shawn M Moore Date: Sun, 9 Nov 2008 07:26:34 +0000 (+0000) Subject: Shouldn't this be enough? :) X-Git-Tag: 0.05~86 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d872e1203a9e428c725b4fa94100c399d2fccba1;p=gitmo%2FMooseX-Role-Parameterized.git Shouldn't this be enough? :) --- diff --git a/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm b/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm index a7cbe8d..584382a 100644 --- a/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm +++ b/lib/MooseX/Role/Parameterized/Meta/Role/Parameterizable.pm @@ -57,6 +57,15 @@ sub generate_role { return $role; } +sub apply { + my $self = shift; + my $class = shift; + my %args = @_; + + my $role = $self->generate_role(%args); + $role->apply($class, %args); +} + __PACKAGE__->meta->make_immutable; no Moose;