class_of role TC is_subtype_of
Shawn M Moore [Sat, 28 Mar 2009 20:59:19 +0000 (16:59 -0400)]
lib/Moose/Meta/TypeConstraint/Role.pm

index 2e531df..f9537fe 100644 (file)
@@ -78,7 +78,7 @@ sub is_subtype_of {
 
     if ( not ref $type_or_name_or_role ) {
         # it might be a role
-        return 1 if $self->role->meta->does_role( $type_or_name_or_role );
+        return 1 if Class::MOP::class_of($self->role)->does_role( $type_or_name_or_role );
     }
 
     my $type = Moose::Util::TypeConstraints::find_type_constraint($type_or_name_or_role);