Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: What Are The Rules For Subs And Modules When Fed Wrong Input

by perrin (Chancellor)
on Jul 21, 2002 at 05:03 UTC ( [id://183778]=note: print w/replies, xml ) Need Help??


in reply to What Are The Rules For Subs And Modules When Fed Wrong Input

You should die so that the person who wrote the incorrect code can find out about the error. Since it's a module, use the Carp module's croak() method instead of die, and that will improve the value of the error message. Also, be sure to document this behavior so that users of your module have an opportunity to catch the error with an eval block if they need to.
  • Comment on Re: What Are The Rules For Subs And Modules When Fed Wrong Input

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (None)
    As of 2024-04-25 00:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found