Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Do the Monks recommend Try::Tiny for eval work?

by dsheroh (Monsignor)
on Oct 30, 2015 at 09:17 UTC ( [id://1146464]=note: print w/replies, xml ) Need Help??


in reply to Do the Monks recommend Try::Tiny for eval work?

I tend to use Try::Tiny. It's simple, it works, and I don't have to think about it. There are definitely other good alternatives (as shown by previous replies), but this is the one that, for me, requires the least (effort|thought).
  • Comment on Re: Do the Monks recommend Try::Tiny for eval work?

Replies are listed 'Best First'.
Re^2: Do the Monks recommend Try::Tiny for eval work?
by hippo (Bishop) on Feb 22, 2019 at 09:17 UTC

    I only started to use Try::Tiny around the time this thread was first posted. Now (over 3 years on) my experience matches dsheroh's. I would only add that the clarity of the syntax for me beats most if not all of the eval idioms. It seems there are several of those and each proponent has their favourite. Anyone else reading them will likely have to stop for a minute and work out what's going on. With try/catch it's clear, even to users of other such modules or even other languages with similar features. For these reasons, and that it is lightweight with no non-core dependencies, I'm very happy to continue to use Try::Tiny.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found