Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Carp::Clan

by ambrus (Abbot)
on Jun 08, 2006 at 18:58 UTC ( #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
Node Status?
node history
Node Type: note [id://554336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2020-02-25 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (113 votes). Check out past polls.

    Notices?