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}
In reply to Re: Replacing warn/die with carp/croak?
by shmem
in thread Replacing warn/die with carp/croak?
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |