This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix SvTRUE() cast (broke xor)
RT #131820
It turns out that the 'xor' operator is almost completely untested in
core. A recent change of mine to the SvTRUE() macros made it sometimes
return an int (SvIVX(sv)) rather than a boolean (SvIVX(sv)!=0), while its
documented to return a boolean.
pp_xor() tests for (SvTRUE(left) != SvTRUE(right)) which subsequently
broke, e.g. (1 xor 5) started returning true rather than false.
Fix SvTRUE() and add some basic xor tests.