7 package Role::Metarole;
13 my $role1 = Moose::Meta::Role->create_anon_role(
18 ok($role1->has_method('foo'), "role has method foo");
19 $role2 = Moose::Util::MetaRole::apply_metaroles(
21 role_metaroles => { role => ['Role::Metarole'] },
23 isnt($role1, $role2, "anon role was reinitialized");
24 is($role1->name, $role2->name, "but it's the same anon role");
25 is_deeply([sort $role2->get_method_list], ['foo', 'meta'],
26 "has the right methods");
28 is_deeply([sort $role2->get_method_list], ['foo', 'meta'],
29 "still has the right methods");