Add a warning for an old style use of TypeConstraint
gfx [Tue, 29 Sep 2009 07:04:49 +0000 (16:04 +0900)]
lib/Mouse/Meta/TypeConstraint.pm

index c9afe63..cfc1aed 100644 (file)
@@ -20,8 +20,8 @@ sub new {
 
     my $check = $args{_compiled_type_constraint} || $args{constraint};
 
-    # FIXME
     if(blessed($check)){
+        Carp::cluck("'constraint' must be a CODE reference");
         $check = $check->{_compiled_type_constraint};
     }