![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re^3: Unexpected result after localizing eval_error variable "$@" within "BEGIN" blockby demerphq (Chancellor) |
on Dec 26, 2007 at 17:57 UTC ( #659089=note: print w/replies, xml ) | Need Help?? |
The question is whether the first example you posted is sane. I personally dont think it is. Thats not to say that im right, but id like to hear a cogent explanation of why im wrong before I change my mind. IOW, it seems to me that localizing $@ should affect only evals called from within the block. Once the block ends (either through run-to-bottom or through a fatal error) the localization should end and the value of the failed eval should be avalable in the outer context. In short, I consider the behaviour of the first example you posted to be inconsistant with both the general understanding of localization and my understanding of how localization works internally. In short I suspect a bug that is more or less the omission of a LEAVE statement.
--- $world=~s/war/peace/g
In Section
Seekers of Perl Wisdom
|
|