From: Jesse Luehrs Date: Thu, 21 Apr 2011 21:15:16 +0000 (-0500) Subject: one more constrained scope in tc inlining X-Git-Tag: 2.0100~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be439f1f343a9fc4e67bb61215d94f71d7012908;p=gitmo%2FMoose.git one more constrained scope in tc inlining --- diff --git a/lib/Moose/Util/TypeConstraints/Builtins.pm b/lib/Moose/Util/TypeConstraints/Builtins.pm index 7c636d3..7beac71 100644 --- a/lib/Moose/Util/TypeConstraints/Builtins.pm +++ b/lib/Moose/Util/TypeConstraints/Builtins.pm @@ -60,7 +60,7 @@ sub define_builtins { => inline_as { 'defined(' . $_[1] . ') ' . '&& (ref(\\' . $_[1] . ') eq "SCALAR"' - . '|| ref(\\(my $val = ' . $_[1] . ')) eq "SCALAR")' + . '|| do { ref(\\(my $val = ' . $_[1] . ')) eq "SCALAR" })' }; subtype 'Num'