Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Capturing stack trace in eval

by Joost (Canon)
on Oct 07, 2009 at 20:22 UTC ( #799806=note: print w/replies, xml ) Need Help??


in reply to Re^2: Capturing stack trace in eval
in thread Capturing stack trace in eval

Can't get into the details right now, the code I've worked on isn't here. One issue is that $SIG{__DIE__} won't work correctly with eval {} and eval "", even when testing $^S.

perlvar sais:

Due to an implementation glitch, the $SIG{__DIE__} hook is called even inside an eval(). Do not use this to rewrite a pending exception in $@, or as a bizarre substitute for overriding CORE::GLOBAL::die(). This strange action at a dis‐ tance may be fixed in a future release so that $SIG{__DIE__} is only called if your program is about to exit, as was the original intent. Any other use is deprecated.
The only thing overriding CORE::GLOBAL::die won't catch is compile-time parser errors, but then you won't need a stack trace.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799806]
help
Chatterbox?
belg4mit kicks Perl in the shins, "Unmatched ) in regex; marked by" my ass
[belg4mit]: Nothing wrong with perl -le 'print ":)" =~ /(?^u:^(\:|\:\))$) /'
[Lotus1]: belg4mit are you on a Linix server?
[belg4mit]: yes. the regular expression is generated in code from a text file. that s the regular expression that Perl blows up when it reaches it, but if I use it from the comman line it's fine
[belg4mit]: oh, wait, damn, different lne number
[choroba]: same Perl version?
[choroba]: oh, ok
[belg4mit]: I had \Q'd in one RE but not a subsequent one, doh

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-04-25 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (460 votes). Check out past polls.