Try-Tiny reviews

RSS | Module Info

Try-Tiny (0.09) ***

Warning: if you are considering this module now that the "Error" module has been decommissioned, of if you are used to try/catch in the C++/Java/.NET worlds, the semantics here are quite different. In most other realms, all exceptions propagate out of a try block, unless you explicitly catch them. Here, the reverse is true - everything is swallowed by the try block, unless you explicitly propagate it in the catch block as follows:

try { # do stuff }
catch { die $_; }
finally { # cleanup };

Why take a known syntax and give it different semantics? That can only lead to confusion. It would be better to use different keywords for this, methinks.

Try-Tiny (0.04) *****

A very good way to catch exceptions.

Comparing to TryCatch, this module provides cleaner code if you have simple try { ... } catch { ... } scenarios and doesn't suffer from Prerequisite Hell Syndrome. From the other hand, TryCatch is about twice as fast and has much powerful exception handling.

You decide.

Try-Tiny (0.02) *****

This code is both excellent and important. It will grossly simplify the way you can handle exceptions. Although it may look like nothing more than eval{}, it is handling all the edge cases that most Perl programmers don't even know about. It will prevent a large class of horrible, difficult to diagnose bugs that cause action at a distance and other forms of baffling failure.

If you are going to throw exceptions (and you probably should) then you should use Try::Tiny to handle them.

Try-Tiny (0.02) *****

This module should be in everyones tool box. It is small, has zero-dependencies, uses no black magic and just does exception handling right so you don't have to worry about it.

There is simply no excuse to NOT be using it, nuff said.

Try-Tiny (0.02) *****

Very nice module: provides a lightweight exception handling - basically a safer, shorter, cleaner and more elegant way to use eval. Great work.