in reply to Re: Replacing warn/die with carp/croak?
in thread Replacing warn/die with carp/croak?

Simplest thing to do is go on using die and warn. Then if someone, perhaps you, wants more info, they can "use diagnostics". It's really much easier that going through your code and replacing everything. It's also more efficient... since the Carp (or diag) module need not be loaded unless there's a problem.

Many module authors have taken to "require Carp" just before croaking.... to alleviate this... which is a cumsy but effective solution.

I really think "use diagnostics" or perl -Mdiagnostics=-traceonly has replaced the need for carp/croak. If you need to be verbose ... you can get it as needed.

  • Comment on Re^2: Replacing warn/die with carp/croak?