Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Difference Between use warnings and use warnings FATAL => 'all'

by BrowserUk (Patriarch)
on Dec 28, 2013 at 01:10 UTC ( [id://1068569]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Difference Between use warnings and use warnings FATAL => 'all'
in thread Difference Between use warnings and use warnings FATAL => 'all'

For "driver has fallen asleep with foot on the accelerator pedal", stopping the car might be a better solution.

Not really. Wind down the window; play music loud; vibrate the seat or steering wheel; a strident bonging sound; all would be preferable to bringing the car to a sudden halt in the middle of a motorway.

If an undef in a variable would led you to deleting every row in a database table, it might be better for the uninitialized warning to be fatal.

It's hard for me to imagine how that would occur, but if it is a possibility, then I might resort to use warnings FATAL => 'uninitialized'; within some limited scope(s); but never FATAL => 'all'.

I routinely eliminate/guard against all warnings in my code as I go along; but when they do occur unexpectedly, seeing whether they are 1-offs or repeated, whether once they start, they persist or are occasional transients; and where the code goes and what other knock-on warnings arise as a result; all assist in the postmortem of working out what went wrong and what to do about it.

Even more so when, for example, you get an unhandled transient warning induced by bad data in a long-running, unattended process.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Difference Between use warnings and use warnings FATAL => 'all'
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found