From: Shawn M Moore Date: Sun, 9 Nov 2008 05:22:18 +0000 (+0000) Subject: We don't need the metametaclass, we just want to operate on the metaclass X-Git-Tag: 0.05~97 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=884a2a3be99d9e1b2f4aa48138eb67e3110067c0;p=gitmo%2FMooseX-Role-Parameterized.git We don't need the metametaclass, we just want to operate on the metaclass --- diff --git a/lib/MooseX/Role/Parameterized/Meta/Role.pm b/lib/MooseX/Role/Parameterized/Meta/Role.pm index 0aa0f21..7aa5703 100644 --- a/lib/MooseX/Role/Parameterized/Meta/Role.pm +++ b/lib/MooseX/Role/Parameterized/Meta/Role.pm @@ -42,15 +42,15 @@ sub generate_role { my $metaclass = Moose::Meta::Class->create_anon_class( superclasses => ['Moose::Meta::Role'], ); + my $role = $metaclass->construct_instance; my $parameters = $self->construct_parameters(%args); - local $MooseX::Role::Parameterized::CURRENT_METACLASS = $metaclass; + local $MooseX::Role::Parameterized::CURRENT_METACLASS = $role; $self->role_generator->($parameters, - operating_on => $metaclass, + operating_on => $role, ); - my $role = $metaclass->construct_instance; return $role; }