http://qs321.pair.com?node_id=1068472


in reply to Difference Between use warnings and use warnings FATAL => 'all'

It's always use warnings, sometimes just use warnings, and other times use warnings FATAL => 'all';, which is the same as use warnings qw( FATAL all );... just a cooler way of typing it.

One of the best ways to prevent bugs from creeping into a program is to write it with as much "questionable behavior" or "questionable practice" detection enabled as possible. This is why C compilers have strict modes, why Perl has strict, and so on. FATAL => all elevates to the level of throwing an exception when a warning occurs. It's like saying, "I want warnings to be exceptional situations." Stop everything, hold the horses, go directly to jail, do not pass go ----- we need to fix this!

There are times where STDERR is routed to a log file, where it won't be immediately seen by the developer or maintainer unless he goes looking for it. Perhaps it gets buried behind a bunch of other stuff that isn't relevant, and it becomes hard to determine the context under which the warning occurred. By stopping the run immediately, nothing else (or very little else) will be in the log. Context becomes more readily apparent.


Dave