in reply to unified warnings, good or bad?

There are some times when I wish I could temporarily demote all my die and croak's while I'm debugging. For example, when I'm parsing a file which has bad data in it, my code will give me an error message, then it will exit. So, I fix the bad data, re-run, then get another error message. This could go on for many iterations. Sometimes it's useful to know as many errors as possible at once. The only way I know of to do this is to edit my code and replace all die with warn. That's a lot of fun.

Also, I have developed the habit of using Carp carp instead of cluck because I can easily promote the latter to the former by Forcing a Stack Trace from the command line using

perl -mCarp=verbose

Replies are listed 'Best First'.
Re^2: unified warnings, good or bad?
by educated_foo (Vicar) on Nov 26, 2009 at 07:33 UTC
    Try *CORE::GLOBAL::die = \&do_something_else.