Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: eval to replace die?

by hsmyers (Canon)
on Oct 04, 2010 at 23:27 UTC ( #863469=note: print w/replies, xml ) Need Help??


in reply to Re: eval to replace die?
in thread eval to replace die?

Ignoring the tennis match going on here, your answer of 'not equivalent' raises the obvious question of what is? I will probably upload to CPAN with the problem resolved using Try::Tiny, but I still wonder if there is a relatively simple Perl solution that just hasn't occurred to me?

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Replies are listed 'Best First'.
Re^3: eval to replace die?
by fireartist (Chaplain) on Oct 05, 2010 at 11:15 UTC

    If the problem is that exception objects should be used instead of die(), then Try::Tiny won't solve this at all!

    Try::Tiny provides an easy-to-use alternative to eval - but without using some other module to provide exception objects, you'll still be stuck having to call die() in the catch{} block.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863469]
help
Chatterbox?
[ambrus]: Eily: also webpages aren't displayed on my monitor no matter what I click with the mouse, and there's a blackout right now, could that be a problem?
[robby_dobby]: ambrus: Yes
[hippo]: erix++: "the browser ate my code"
[robby_dobby]: Eily: Now, people are trying to be inventive with crowdsourcing their work, eh? Sure, call on the admins to k-line these sockpuppet accounts!
[robby_dobby]: hippo: I like how you equated your browser to a dog....
[Eily]: well, Anonymonk is everyone's sockpuppet :D

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











    Results (454 votes). Check out past polls.