bump version to 0.73_01
[gitmo/Moose.git] / lib / Moose / Util / TypeConstraints.pm
index bd1f63b..04c76cc 100644 (file)
@@ -9,7 +9,7 @@ use List::MoreUtils qw( all any );
 use Scalar::Util qw( blessed reftype );
 use Moose::Exporter;
 
-our $VERSION = '0.73';
+our $VERSION = '0.73_01';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -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;
 
@@ -1010,7 +1009,7 @@ recommend that you use a C<requires>-only Role instead.
 
 If passed an ARRAY reference instead of the C<$name>, C<@methods>
 pair, this will create an unnamed duck type. This can be used in an
-attribute definiton like so:
+attribute definition like so:
 
   has 'cache' => (
       is  => 'ro',