My modules aren't in CPAN (I guess one of these days, I should release 'em, but there's less than 10 people who seem to be searching for solar physics data and were interested in installing the software so far), but I'd have to say that I use both carp and warn. I _rarely_ use croak or die.
Basically, if we were to think of it as the difference in a webserver throwing a 500 level error vs. a 400 level error -- was this something wrong with _this_ code, or was it somethig wrong with the code that called this code?
So, if bad arguments were passed in, I use carp. If I hit a branch of logic that seems like something went wrong with my code, I use warn (in extreme cases, die, but they're typically reserved for major problems, like someone not defining required functions when inheriting an abstract class ).
In reply to Re: Replacing warn/die with carp/croak?
by jhourcle
in thread Replacing warn/die with carp/croak?
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |