Cleanup
[gitmo/Mouse.git] / lib / Mouse / Util / TypeConstraints.pm
index ce292dd..71a0c72 100644 (file)
@@ -8,7 +8,6 @@ use Carp qw(confess);
 use Scalar::Util qw/blessed looks_like_number openhandle/;
 
 use Mouse::Util qw(does_role not_supported);
-use Mouse::Meta::Module; # class_of
 use Mouse::Meta::TypeConstraint;
 
 our @ISA    = qw(Exporter);
@@ -75,7 +74,7 @@ BEGIN {
         );
     }
 
-    sub optimized_constraints {
+    sub optimized_constraints { # DEPRECATED
         Carp::cluck('optimized_constraints() has been deprecated');
         return \%TYPE;
     }
@@ -187,7 +186,7 @@ sub role_type {
     );
 }
 
-sub typecast_constraints {
+sub typecast_constraints { # DEPRECATED
     my($class, $pkg, $type, $value) = @_;
     Carp::croak("wrong arguments count") unless @_ == 4;
 
@@ -221,7 +220,7 @@ sub _find_or_create_regular_type{
 
     return $TYPE{$spec} if exists $TYPE{$spec};
 
-    my $meta  = Mouse::Meta::Module::class_of($spec);
+    my $meta  = Mouse::Util::get_metaclass_by_name($spec);
 
     if(!$meta){
         return;