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).
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.
| [reply] |
|