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

Re: How many different ways can Perl code fail?

by samtregar (Abbot)
on Jan 13, 2009 at 22:20 UTC ( [id://736098]=note: print w/replies, xml ) Need Help??


in reply to How many different ways can Perl code fail?

Other ways code can fail, for various definitions of failure:

  • It could loop infinitely, never returning.
  • It could run out of memory and get killed by the OS.
  • It could crash your operating system.
  • It could call exit() or more powerfully POSIX::exit().
  • It could seg-fault and dump core, for example by calling CORE::dump() or by hitting a bug in Perl.

-sam

  • Comment on Re: How many different ways can Perl code fail?

Replies are listed 'Best First'.
Re^2: How many different ways can Perl code fail?
by Jeffrey Kegler (Hermit) on Jan 14, 2009 at 02:20 UTC
    This was quite useful. In my case and I think many cases, none of these are worth coding for because of one or more of:
    1. Not decidable in the general case.
    2. A lot of overhead to decide in special cases.
    3. Not catchable in Perl.
    4. Catchable, but to do so is much more likely to get in the user's way than to help her.

    But it's a very nicely itemized list and it's a useful exercise every time a programmer encounters a new type of application for her to think out each of these cases, to see if she is doing all she can to help her users. I found thinking it over very useful. Thanks.

    You might consider extending this list with your redaction of my basic cases, plus Larry Wall's "lightning bolt from Zeus" as mentioned in his description of Hubris as one of the programmer's virtues, and posting it as a Meditation. I'd find it useful for reference.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found