Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Unexpected result after localizing eval_error variable "$@" within "BEGIN" block

by demerphq (Chancellor)
on Dec 26, 2007 at 17:57 UTC ( #659089=note: print w/replies, xml ) Need Help??


in reply to Re^2: Unexpected result after localizing eval_error variable "$@" within "BEGIN" block
in thread Unexpected result after localizing eval_error variable "$@" within "BEGIN" block

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

  • Comment on Re^3: Unexpected result after localizing eval_error variable "$@" within "BEGIN" block

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://659089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2023-12-11 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?