From: Shawn M Moore Date: Sat, 28 Mar 2009 21:41:51 +0000 (-0400) Subject: unoptimized RoleName class_of X-Git-Tag: 0.73_01~36^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b885dfa5c9599dad70d91e6c3122796a7096573;p=gitmo%2FMoose.git unoptimized RoleName class_of --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index bd1f63b..6d902aa 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -670,8 +670,7 @@ subtype 'ClassName' => as 'Str' => \&Moose::Util::TypeConstraints::OptimizedConstraints::ClassName; subtype 'RoleName' => as 'ClassName' => where { - ( ( $_->can('meta') || return )->($_) || return ) - ->isa('Moose::Meta::Role'); + (Class::MOP::class_of($_) || return)->isa('Moose::Meta::Role'); } => optimize_as \&Moose::Util::TypeConstraints::OptimizedConstraints::RoleName;