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

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

by educated_foo (Vicar)
on Dec 28, 2013 at 02:10 UTC ( #1068575=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'

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.
This is why you put in thorough sanity checks before doing something so destructive:
if (defined $thing) { destroy_database($thing); } else { do_something_else(); }
undef has well-defined semantics in Perl (empty or zero), which are very useful in most cases. You should know when your code may do something catastrophic, and be very careful then, but that's no reason to be paranoid everywhere.


Comment on Re^3: Difference Between use warnings and use warnings FATAL => 'all'
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (18)
As of 2015-07-01 18:18 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 (16 votes), past polls