[Moose-commits] r7351 - Moose/trunk/lib/Moose/Util
rjbs at code2.0beta.co.uk
rjbs at code2.0beta.co.uk
Wed Jan 21 23:11:57 GMT 2009
Author: rjbs
Date: 2009-01-21 15:11:57 -0800 (Wed, 21 Jan 2009)
New Revision: 7351
Modified:
Moose/trunk/lib/Moose/Util/TypeConstraints.pm
Log:
register the type
Modified: Moose/trunk/lib/Moose/Util/TypeConstraints.pm
===================================================================
--- Moose/trunk/lib/Moose/Util/TypeConstraints.pm 2009-01-21 23:11:17 UTC (rev 7350)
+++ Moose/trunk/lib/Moose/Util/TypeConstraints.pm 2009-01-21 23:11:57 UTC (rev 7351)
@@ -306,16 +306,16 @@
my ($type_parameter) = @_;
register_type_constraint(
- # $REGISTRY->get_type_constraint('Maybe')
- # ->get_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