X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FUtil%2FTypeConstraints%2FOptimizedConstraints.pm;h=341124e16ca7f9d06b0f80af2906c1d241cb7522;hb=d03bd989b97597428b460d7f9a021e2931893fa0;hp=24c9f92eba268c499a53414cf6ae6e002bd06deb;hpb=4b2189ce8dae168787b635b71a918bd64461ed7a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm b/lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm index 24c9f92..341124e 100644 --- a/lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm +++ b/lib/Moose/Util/TypeConstraints/OptimizedConstraints.pm @@ -6,7 +6,7 @@ use warnings; use Class::MOP; use Scalar::Util 'blessed', 'looks_like_number'; -our $VERSION = '0.72'; +our $VERSION = '0.75_01'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -38,8 +38,8 @@ sub ClassName { } sub RoleName { - ClassName($_[0]) - && (($_[0]->can('meta') || return)->($_[0]) || return)->isa('Moose::Meta::Role') + ClassName($_[0]) + && (Class::MOP::class_of($_[0]) || return)->isa('Moose::Meta::Role') } # NOTE: @@ -60,7 +60,7 @@ bodies for various moose types =head1 DESCRIPTION -This file contains the hand optimized versions of Moose type constraints, +This file contains the hand optimized versions of Moose type constraints, no user serviceable parts inside. =head1 FUNCTIONS @@ -103,7 +103,7 @@ no user serviceable parts inside. =head1 BUGS -All complex software has bugs lurking in it, and this module is no +All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.