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

index 00b60ac..2e531df 100644 (file)
@@ -50,7 +50,7 @@ sub parents {
             Moose::Util::TypeConstraints::find_type_constraint($_) 
                 || 
             __PACKAGE__->new( role => $_, name => "__ANON__" )
-        } @{ $self->role->meta->get_roles },
+        } @{ Class::MOP::class_of($self->role)->get_roles },
     );
 }