This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t let ?: folding affect stat
authorFather Chrysostomos <sprout@cpan.org>
Thu, 26 Jul 2012 03:15:36 +0000 (20:15 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 26 Jul 2012 05:08:32 +0000 (22:08 -0700)
commit9a0c99494cbbb7d1253332ab4ce0581e90f707a7
tree98ceb547aaaadfecdcf45c59bb9c4b582f4af588
parent8777c9be0f45ac3c917698c1afb18e1e8507a188
Don’t let ?: folding affect stat

stat(${\1} ? foo : bar) and stat(1 ? foo : bar) should behave the same
way, but were treated differently, due to the way ?: is folded in
the latter case.  Now that foldedness is recorded in the op tree
(cc2ebcd7902), we can use the OPpCONST_FOLDED flag to distinguish
stat(1 ? foo : bar) from stat(foo).
op.c
t/comp/fold.t