X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FUtil.pm;h=a5678b991f83a4a8621d4bd1841e1b3a50f899e1;hp=a2593cf2e4d758872a43f50452d322b3f55636d5;hb=02d8cd0afb685d4a3b8e6dcf6e9deec01c9b9e6e;hpb=b06ce1f502945c13a52c503f1a651fe92c91c773 diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index a2593cf..a5678b9 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -15,7 +15,7 @@ BEGIN{ require XSLoader; XSLoader::load('Mouse', $VERSION); }; - warn $@ if $@; # for DEBUGGING + #warn $@ if $@; } if($need_pp){ @@ -252,8 +252,7 @@ sub apply_all_roles { my $role_name = $roles[-1][0]; load_class($role_name); - my $metarole = get_metaclass_by_name($role_name); - ( $metarole && $metarole->isa('Mouse::Meta::Role') ) + Mouse::Util::TypeConstraints::_is_a_metarole( get_metaclass_by_name($role_name) ) || $applicant->meta->throw_error("You can only consume roles, $role_name(".$role_name->meta.") is not a Mouse role"); }