diff options
author | Hauke D <haukex@zero-g.net> | 2014-01-13 00:50:51 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-01-22 16:32:14 +1100 |
commit | c91312d5e67fd262ccd6f36ff40ddbca6896d004 (patch) | |
tree | 95057cfca0a55d90b2a3af13205b44701698c773 /pod/perllexwarn.pod | |
parent | e214621be67f417c619e2038fcb4742892fde1b1 (diff) | |
download | perl-c91312d5e67fd262ccd6f36ff40ddbca6896d004.tar.gz |
assume "all" in "use warnings 'FATAL';" and related
Until now, the behavior of the statements
use warnings "FATAL";
use warnings "NONFATAL";
no warnings "FATAL";
was unspecified and inconsistent. This change causes them to be handled
with an implied "all" at the end of the import list.
Tony Cook: fix AUTHORS formatting
Diffstat (limited to 'pod/perllexwarn.pod')
-rw-r--r-- | pod/perllexwarn.pod | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index 4a41789237..b4fed79ca1 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -405,6 +405,19 @@ except for those in the "syntax" category. use warnings FATAL => 'all', NONFATAL => 'syntax'; +As of Perl 5.20, instead of C<< use warnings FATAL => 'all'; >> you can +use: + + use v5.20; # Perl 5.20 or greater is required for the following + use warnings 'FATAL'; # short form of "use warnings FATAL => 'all';" + +If you want your program to be compatible with versions of Perl before +5.20, you must use C<< use warnings FATAL => 'all'; >> instead. (In +previous versions of Perl, the behavior of the statements +C<< use warnings 'FATAL'; >>, C<< use warnings 'NONFATAL'; >> and +C<< no warnings 'FATAL'; >> was unspecified; they did not behave as if +they included the C<< => 'all' >> portion. As of 5.20, they do.) + B<NOTE:> Users of FATAL warnings, especially those using C<< FATAL => 'all' >> should be fully aware that they are risking future portability of their |