my $role = $self->parameterized_role_metaclass->create_anon_role(parameters => $parameters);
local $MooseX::Role::Parameterized::CURRENT_METACLASS = $role;
+
+ $self->apply_parameterized_role($role);
+
$self->role_generator->($parameters,
operating_on => $role,
);
$role->apply($class, %args);
}
+sub apply_parameterized_role {
+ my $self = shift;
+
+ $self->SUPER::apply(@_);
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
use strict;
use warnings;
-#use Test::More tests => 3;
-use Test::More skip_all => 'TODO';
+use Test::More tests => 3;
use Test::Moose;
{
cmp_ok(
$generated_role->meta->get_roles->[0]->name,
'eq',
- 'MyProle',
+ 'MyPRole',
'generated role does the parameterized role'
);