diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2002-06-20 18:14:12 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-20 15:27:18 +0000 |
commit | 6e9af7e4283affa5138ab8f50e01b3144acd68ca (patch) | |
tree | f57e517d5e07f3f5e90b174add6216721208bd2a /pod/perllexwarn.pod | |
parent | 353813d9d162685fa077a818008763d730617d20 (diff) | |
download | perl-6e9af7e4283affa5138ab8f50e01b3144acd68ca.tar.gz |
RE: mixing FATAL and non-FATAL warnings
From: "Paul Marquess" <Paul.Marquess@btinternet.com>
Message-ID: <AIEAJICLCBDNAAOLLOKLOEJAEOAA.Paul.Marquess@btinternet.com>
p4raw-id: //depot/perl@17325
Diffstat (limited to 'pod/perllexwarn.pod')
-rw-r--r-- | pod/perllexwarn.pod | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index 7b3ce3ce20..8ee7fc3248 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -351,13 +351,20 @@ The scope where C<length> is used has escalated the C<void> warnings category into a fatal error, so the program terminates immediately it encounters the warning. -To explicitly disable a "FATAL" warning you just disable the warning it is -associated with. So, for example, to disable the "void" warning in the -example above, either of these will do the trick: +To explicitly turn off a "FATAL" warning you just disable the warning +it is associated with. So, for example, to disable the "void" warning +in the example above, either of these will do the trick: no warnings qw(void); no warnings FATAL => qw(void); +If you want to downgrade a warning that has been escalated into a fatal +error back to a normal warning, you can use the "NONFATAL" keyword. For +example, the code below will promote all warnings into fatal errors, +except for those in the "syntax" category. + + use warnings FATAL => 'all', NONFATAL => 'syntax'; + =head2 Reporting Warnings from a Module The C<warnings> pragma provides a number of functions that are useful for |