From: Shawn M Moore Date: Sat, 28 Mar 2009 20:59:19 +0000 (-0400) Subject: class_of role TC is_subtype_of X-Git-Tag: 0.73_01~36^2~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f84b0383d28b94e613c217710602fcf686d6d9c;p=gitmo%2FMoose.git class_of role TC is_subtype_of --- diff --git a/lib/Moose/Meta/TypeConstraint/Role.pm b/lib/Moose/Meta/TypeConstraint/Role.pm index 2e531df..f9537fe 100644 --- a/lib/Moose/Meta/TypeConstraint/Role.pm +++ b/lib/Moose/Meta/TypeConstraint/Role.pm @@ -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);