If you add a warn or some other statement, it happens in both cases. I'm currently trying to see if anything in the B::Concise output is an indication.
Update: this is the result, reduced to its relevant bits:
$ perl -MO=Concise,-tree t.pl # from your code verbatim: # ... |-scope-+-ex-nextstate | `-ex-rv2sv---<4>gvsv(*bar) `-<9>leave-+-<6>enter |-<7>nextstate(main 2 t.pl:11) `-ex-rv2sv---<8>gvsv(*baz) # after adding warns # ... |-<i>leave-+-<c>enter | |-<5>nextstate(main 1 t.pl:7) | |-<7>warn[t1]---<6>pushmark | |-<8>nextstate(main 1 t.pl:8) | `-ex-rv2sv---<9>gvsv(*bar) `-<i>leave-+-<c>enter |-<d>nextstate(main 2 t.pl:12) |-<f>warn[t2]---<e>pushmark |-<g>nextstate(main 2 t.pl:13) `-ex-rv2sv---<h>gvsv(*baz)
As you see, the truth-branch of your condition works in the cases where the compiler doesn't set up a complete scope for it for whatever reason.
Don't ask me exactly why that is a problem and what this all means, yet. :-)
Makeshifts last the longest.
In reply to Re: Oddness with lvalue and if/else blocks
by Aristotle
in thread Oddness with lvalue and if/else blocks
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |