From: Shawn M Moore Date: Sat, 28 Mar 2009 20:34:04 +0000 (-0400) Subject: Comment applies here too X-Git-Tag: 0.73_01~36^2~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d0f5a277070cbc8cb25aabe665e8b335b6c08c2;p=gitmo%2FMoose.git Comment applies here too --- diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 8dcd432..8f88bab 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -127,6 +127,10 @@ sub does_role { foreach my $class ($self->class_precedence_list) { my $meta = Class::MOP::class_of($class); + # when a Moose metaclass is itself extended with a role, + # this check needs to be done since some items in the + # class_precedence_list might in fact be Class::MOP + # based still. next unless $meta && $meta->can('roles'); foreach my $role (@{$meta->roles}) { return 1 if $role->does_role($role_name);