[Moose-commits] r7352 - Moose/trunk/lib/Moose/Util

rjbs at code2.0beta.co.uk rjbs at code2.0beta.co.uk
Wed Jan 21 23:12:40 GMT 2009


Author: rjbs
Date: 2009-01-21 15:12:40 -0800 (Wed, 21 Jan 2009)
New Revision: 7352

Modified:
   Moose/trunk/lib/Moose/Util/TypeConstraints.pm
Log:
fix mistaken commit

Modified: Moose/trunk/lib/Moose/Util/TypeConstraints.pm
===================================================================
--- Moose/trunk/lib/Moose/Util/TypeConstraints.pm	2009-01-21 23:11:57 UTC (rev 7351)
+++ Moose/trunk/lib/Moose/Util/TypeConstraints.pm	2009-01-21 23:12:40 UTC (rev 7352)
@@ -306,16 +306,16 @@
     my ($type_parameter) = @_;
 
     register_type_constraint(
-      $REGISTRY->get_type_constraint('Maybe')
-       ->generate_constraint_for($type_parameter)
-      # Moose::Meta::TypeConstraint->new(
-      #     parent               => find_type_constraint('Item'),
-      #     constraint           => sub {
-      #         my $check = $type_parameter->_compiled_type_constraint;
-      #         return 1 if not(defined($_)) || $check->($_);
-      #         return;
-      #     }
-      # )
+      # $REGISTRY->get_type_constraint('Maybe')
+      #  ->generate_constraint_for($type_parameter)
+      Moose::Meta::TypeConstraint->new(
+          parent               => find_type_constraint('Item'),
+          constraint           => sub {
+              my $check = $type_parameter->_compiled_type_constraint;
+              return 1 if not(defined($_)) || $check->($_);
+              return;
+          }
+      )
     );
 }
 




More information about the Moose-commits mailing list