in reply to Bare blocks forgetting lexical values
Is this a bug, undefined behaviour or just a general lack of wakefulness on my behalf.
I vote for "undefined behaviour." As $x is lexical, once you leave the block it is completely reasonable that its storage be reallocated, right? In your example, you are jumping right back into the block but what if there was a fair amount of complexity between exit and reentry?
If I had two votes, I might call it a bug too. I think that $x should cease to exist on exit and on reentry you should be modifying the package's $x.
-sauoq "My two cents aren't worth a dime.";
|
|---|