Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Carp::Clan

by ambrus (Abbot)
on Jun 08, 2006 at 18:58 UTC ( [id://554336]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://554336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-19 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found