From: Jesse Luehrs Date: Fri, 17 Jun 2011 22:56:38 +0000 (-0500) Subject: adding quotes around arbitrary stuff isn't safe, just stringify X-Git-Tag: 2.0102~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd660a0fe92f36dfd81c1a0d6d2ca39efdba1b30;p=gitmo%2FMoose.git adding quotes around arbitrary stuff isn't safe, just stringify --- diff --git a/lib/Moose/Util/TypeConstraints/Builtins.pm b/lib/Moose/Util/TypeConstraints/Builtins.pm index a19c90a..8aed469 100644 --- a/lib/Moose/Util/TypeConstraints/Builtins.pm +++ b/lib/Moose/Util/TypeConstraints/Builtins.pm @@ -48,8 +48,8 @@ sub define_builtins { . ' && (' . '!defined(' . $_[1] . ') ' . '|| ' . $_[1] . ' eq "" ' - . '|| "' . $_[1] . '" eq "1" ' - . '|| "' . $_[1] . '" eq "0"' + . '|| (' . $_[1] . '."") eq "1" ' + . '|| (' . $_[1] . '."") eq "0"' . ')' };