RECENT ENTRIES
Apparently using exceptions as flow control can be very bad. That blog post has some concrete numbers on the performance hit of die()/eval() versus return() and versus eval{return()}.
I've often wondered about this but had never followed up by performing some simple tests. The absolute worst case of this I have ever seen was when I was benchmarking the protobuf-perl library. At that time Moose was capturing a confess() by Class::MOP. It was doing this thousands of times for even simple tasks. As you can see if you read this thread getting rid of the confess() was a big win (although protobuf-perl was still slow). I wonder if getting rid of the eval would have proven to be even more beneficial? As I wrote about here I will likely never know.
PERL BLOGS