Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: Rethrowing with die $@ considered harmful (best practices)

by tye (Sage)
on Jul 21, 2006 at 15:27 UTC ( #562886=note: print w/replies, xml ) Need Help??

in reply to Re^2: Rethrowing with die $@ considered harmful
in thread Rethrowing with die $@ considered harmful

So I think the better solution is to extend this warning / practice to FETCH- and STORE-type subs, rather than having code that uses $@ have to be paranoid that $@ might be tied to something that uses eval in its FETCH. Such a FETCH should be considered "broken" from a "best practices" point of view.

Being paranoid about $@ changing on you is not a bad practice. I'm just saying that in comparison, using eval w/o local($@) in a FETCH is a worse practice. And that is especially true for a FETCH meant to be used with $@.

- tye        

  • Comment on Re^3: Rethrowing with die $@ considered harmful (best practices)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2021-12-03 00:39 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (27 votes). Check out past polls.