types can have messages now
Stevan Little [Thu, 15 Mar 2007 21:37:15 +0000 (21:37 +0000)]
lib/Moose/Util/TypeConstraints.pm

index c91a6c1..abd67f5 100644 (file)
@@ -120,8 +120,8 @@ sub unimport {
 # type constructors
 
 sub type ($$;$$) {
-       my ($name, $check, @rest) = @_;
-       _create_type_constraint($name, undef, $check, @rest);
+    splice(@_, 1, 0, undef);
+       goto &_create_type_constraint;  
 }
 
 sub subtype ($$;$$$) {