From: Jesse Luehrs Date: Sun, 19 Jun 2011 04:26:49 +0000 (-0500) Subject: these are unnecessary, since we know the parent is Item X-Git-Tag: 2.0103~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=295129da9dca4f3f1b71ffe325886087dd46c699;p=gitmo%2FMoose.git these are unnecessary, since we know the parent is Item --- diff --git a/lib/Moose/Util/TypeConstraints/Builtins.pm b/lib/Moose/Util/TypeConstraints/Builtins.pm index 8aed469..832f592 100644 --- a/lib/Moose/Util/TypeConstraints/Builtins.pm +++ b/lib/Moose/Util/TypeConstraints/Builtins.pm @@ -28,24 +28,21 @@ sub define_builtins { => as 'Item' => where { !defined($_) } => inline_as { - $_[0]->parent()->_inline_check($_[1]) - . ' && !defined(' . $_[1] . ')' + '!defined(' . $_[1] . ')' }; subtype 'Defined' => as 'Item' => where { defined($_) } => inline_as { - $_[0]->parent()->_inline_check($_[1]) - . ' && defined(' . $_[1] . ')' + 'defined(' . $_[1] . ')' }; subtype 'Bool' => as 'Item' => where { !defined($_) || $_ eq "" || "$_" eq '1' || "$_" eq '0' } => inline_as { - $_[0]->parent()->_inline_check($_[1]) - . ' && (' + '(' . '!defined(' . $_[1] . ') ' . '|| ' . $_[1] . ' eq "" ' . '|| (' . $_[1] . '."") eq "1" '