This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #118159] Make PVs take precedence in SvTRUE
authorFather Chrysostomos <sprout@cpan.org>
Sun, 26 May 2013 06:59:45 +0000 (23:59 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 26 May 2013 07:18:23 +0000 (00:18 -0700)
commit762dbf22cb22645771fc27b5d197fd40cbbd9da8
tree996e137a38e7dbeccd2719a7c0b09c848ad0d4e0
parentab830aa00cac1e0b1157a24d5df949dbcfa4dc40
[perl #118159] Make PVs take precedence in SvTRUE

Commit 4bac9ae4 (probably inadvertently) changed SvTRUE to treat an SV
with any of PVX, IVX or NVX having a true value as true.

Traditionally, truth was based solely on stringification. The examina-
tion of the SvIVX and SvNVX slots was for those cases where there was
no string already and it could be deduced from IVX or NVX whether it
would stringify as "0" or no (bugs with -0 aside).

This changes things back to the way they have ‘always’ been.
sv.h
t/op/not.t