Skip to content

Commit

Permalink
Add a role for composite metaroles to apply our summation application…
Browse files Browse the repository at this point in the history
… role.
  • Loading branch information
rafl committed Jul 30, 2009
1 parent 91a0abb commit d78810d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/MooseX/Role/WithOverloading/Meta/Role/Composite.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package MooseX::Role::WithOverloading::Meta::Role::Composite;

use Moose::Role;
use Moose::Util::MetaRole;
use aliased 'MooseX::Role::WithOverloading::Meta::Role::Application::RoleSummation';

use namespace::clean -except => 'meta';

around _new => sub {
my ($next, $self, @args) = @_;
return Moose::Util::MetaRole::apply_metaclass_roles(
for => $self->$next(@args),
application_role_summation_class_roles => [ RoleSummation ],
);
};

1;

0 comments on commit d78810d

Please sign in to comment.