in reply to Carp::Clan

It's because it's not always the caller that's wrong. Sometimes it's better to see where the error appears in the module.

Btw, ruby and I think python too typically gives a full stack trace on errors. That's the best thing to do I belive, because the interperter can't decide which function really "caused" the error.

Replies are listed 'Best First'.
Re^2: Carp::Clan
by Aristotle (Chancellor) on Jun 08, 2006 at 20:59 UTC

    If a parameter fails to validate, then it’s the caller who is wrong. That doesn’t change, even if the parameter is only validated several internal subroutine calls deeper than where the module picked it up. If the validation code itself does happen to be at fault, you can still get a stack trace on demand by asking Carp to be verbose.

    Makeshifts last the longest.