- added ->create_anon_class which now supports roles and caching of
the results (thanks to jrockway)
- added tests for this
+ - made ->does_role a little more forgiving when it is
+ checking a Class::MOP era metaclasses.
* Moose::Meta::Role::Application::ToInstance
- it is now possible to pass extra params to be used when
(defined $role_name)
|| confess "You must supply a role name to look for";
foreach my $class ($self->class_precedence_list) {
- next unless $class->can('meta');
+ next unless $class->can('meta') && $class->meta->can('roles');
foreach my $role (@{$class->meta->roles}) {
return 1 if $role->does_role($role_name);
}