Subject: | [PATCH] wrong return precedence |
returns bind stronger than and, so the expression after and is ignored:
return ref($a) eq ref($b) and refaddr($a) == refaddr($b);
=>
return (ref($a) eq ref($b) and refaddr($a) == refaddr($b));
See https://rt.perl.org/rt3/Public/Bug/Display.html?id=59802
Subject: | XML-XSS-0.3.1-returnor.patch |
diff -bu XML-XSS-0.3.1-xj_2Cr/lib/XML/XSS/StyleAttribute.pm~ XML-XSS-0.3.1-xj_2Cr/lib/XML/XSS/StyleAttribute.pm
--- XML-XSS-0.3.1-xj_2Cr/lib/XML/XSS/StyleAttribute.pm~ 2011-03-14 18:02:34.000000000 -0600
+++ XML-XSS-0.3.1-xj_2Cr/lib/XML/XSS/StyleAttribute.pm 2013-07-20 21:22:08.358694090 -0600
@@ -30,8 +30,8 @@
'=' => sub { shift },
'eq' => sub {
my ( $a, $b ) = @_;
- return ref($a) eq ref($b)
- and refaddr($a) == refaddr($b);
+ return (ref($a) eq ref($b)
+ and refaddr($a) == refaddr($b));
};