Exception Handling (when to use it)

Smylers Smylers at stripey.com
Fri Jul 13 10:43:57 BST 2007


Ovid writes:

> Hmm, it would be nice if someone would start benchmarking various Perl
> exception handling mechanisms to make it easier to understand "best
> practices".
> 
> Does Perl have similar limitations?  I've never worried about it that
> much, to be honest.

Following the way of using exceptions you suggested earlier, it surely
doesn't matter: under 'normal' conditions an exception isn't going to
get thrown, so its speed is irrelevant.

I think there are much more important factors in picking an appropriate
Perl exception mechanism (I'm a Exception::Class fan too), and a speed
comparison may distract people from considering those.

Smylers


More information about the london.pm mailing list