If you have an anonymous function die, you can still "name" the function to make for better error messages:
use Carp 'croak'; sub { local *__ANON__ = 'my_anonymous_sub'; croak("Whee!"); }->(); __END__ Whee! at anon.pl line 9 main::my_anonymous_sub() called at anon.pl line 10
Unfortunately, if the error is in an eval, you get messsages like:
Some annoying error at (eval 7) line 17281Can anyone think of a method of naming evals to make debugging easier?
Cheers,
Ovid
New address of my CGI Course.
In reply to Named evals? by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |