diff options
author | Niels Thykier <niels@thykier.net> | 2013-07-15 22:40:48 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-15 14:27:44 -0700 |
commit | 13c65ef8cd53d353c932eb688b59f1ca81f5c374 (patch) | |
tree | 6e11d3814dd3f37ef85be1b325781097905908c3 /cpan/Test-Simple/lib | |
parent | 846aaad81e649b939e2440363c4d527f7c67131b (diff) | |
download | perl-13c65ef8cd53d353c932eb688b59f1ca81f5c374.tar.gz |
Test::Builder: Fix "return $a or $b" precedence issue
perl parses "return $a or $b" effectively as "return $a;", which is
not what was intended.
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'cpan/Test-Simple/lib')
-rw-r--r-- | cpan/Test-Simple/lib/Test/Builder.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm index cb4335f5ce..729448c232 100644 --- a/cpan/Test-Simple/lib/Test/Builder.pm +++ b/cpan/Test-Simple/lib/Test/Builder.pm @@ -915,7 +915,7 @@ sub _is_dualvar { no warnings 'numeric'; my $numval = $val + 0; - return $numval != 0 and $numval ne $val ? 1 : 0; + return ($numval != 0 and $numval ne $val ? 1 : 0); } =item B<is_eq> |