Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Re: BEGIN, eval {} and $^S

by eclark (Scribe)
on Dec 17, 2003 at 02:57 UTC ( #315202=note: print w/replies, xml ) Need Help??

in reply to Re: BEGIN, eval {} and $^S
in thread BEGIN, eval {} and $^S

Thats a good idea, I will use it in the future. It doesn't solve my problem because the DIE handler still wont know if it was called within eval or not.

Replies are listed 'Best First'.
Re: Re: Re: BEGIN, eval {} and $^S
by diotalevi (Canon) on Dec 17, 2003 at 03:36 UTC
    I think you'll have to pass that state to yourself via a global. How about something like $^S_FOR_REAL_AND_FOR_TRUE? You'd set it to something true prior to entering eval-string and clear it afterwards. You can inspect that during $SIG{__DIE__}.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2022-05-23 15:07 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.