in reply to Replacing warn/die with carp/croak?
There are cases in which croak reports wrong line numbers. I generally prefer modules which use just warn and don't die, because die in a module leads to evalitis.
I would rather see warn in modules, because I can override that easily with a $SIG{__WARN__} = \&Carp::cluck, and don't have to redefine Carp::croak.
I have stumbled over a very nasty usage of croak in the IO::All module, which wraps croak into a function called throw(). Took me some time wondering, and searching through the module to find out why my __DIE__ handler didn't work. I ended up redefining IO::All::throw with a custom function.
So, I wouldn't make the change, but answer to the ticket issuer "You can always install your custom handlers via $SIG{__WARN__} and $SIG{__DIE__}" and leave it there.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Replacing warn/die with carp/croak?
by dragonchild (Archbishop) on Oct 04, 2007 at 14:50 UTC | |
by shmem (Chancellor) on Oct 04, 2007 at 15:19 UTC | |
by stvn (Monsignor) on Oct 04, 2007 at 17:52 UTC | |
|
Re^2: Replacing warn/die with carp/croak?
by fenLisesi (Priest) on Oct 05, 2007 at 08:45 UTC | |
by shmem (Chancellor) on Oct 05, 2007 at 08:56 UTC | |
by fenLisesi (Priest) on Oct 05, 2007 at 09:17 UTC |