Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Surviving 'Illegal division by zero'

by melora (Scribe)
on Jun 24, 2004 at 02:34 UTC ( [id://369228]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Surviving 'Illegal division by zero'
in thread Surviving 'Illegal division by zero'

I agree, especially from the viewpoint of maintainability. Better to handle such situations (there may be cases other than division by zero which need special attention) in one encapsulated place. The other choices are to dig through all the code, restructuring where needed to handle the exceptional case, or to try to capture the exception (which tells you when the problem has happened rather than letting you avoid it).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found