Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re*Re^2: Best Practices for Exception Handling

by bart (Canon)
on Jan 29, 2003 at 09:40 UTC ( #230894=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Best Practices for Exception Handling
in thread Best Practices for Exception Handling

of course, you might want to handle a method that can return 0 by using defined
Or use the trick that some other modules use: return "0E0" or "0 but true" for zero, as a string. These are both true and 0, and do not produce warnings when converted into a number, the former because it's a normal floating point format, the latter because it's a hardcoded exception in perl.

Now I come to think of it: you can use any normal format for zero, as long as it's not "0", for example "0.0".


Comment on Re*Re^2: Best Practices for Exception Handling
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-08-01 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls