From: Shawn M Moore Date: Sat, 28 Mar 2009 21:27:59 +0000 (-0400) Subject: class_of Util::apply_all_roles 1/2 X-Git-Tag: 0.73_01~36^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=75e282103514468543b654637fbe92ad9d96c5bc;p=gitmo%2FMoose.git class_of Util::apply_all_roles 1/2 --- diff --git a/lib/Moose/Util.pm b/lib/Moose/Util.pm index 192e3c9..ed9f398 100644 --- a/lib/Moose/Util.pm +++ b/lib/Moose/Util.pm @@ -87,8 +87,7 @@ sub apply_all_roles { } foreach my $role (@$roles) { - unless ( $role->[0]->can('meta') - && $role->[0]->meta->isa('Moose::Meta::Role') ) { + unless (Class::MOP::class_of($role->[0])->isa('Moose::Meta::Role') ) { require Moose; Moose->throw_error( "You can only consume roles, "