cvs commit: perlfaq perlfaq7.pod
[email protected] (brian d foy) 3 Nov 2004 22:54:08 -0000
| Newsgroups | perl.cvs.perlfaq |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/11/03 14:54:08
Modified: . perlfaq7.pod
Log:
* How do I temporarily block warnings?
+ mention warning categories and perllexwarn
Revision Changes Path
1.18 +11 -1 perlfaq/perlfaq7.pod
Index: perlfaq7.pod
===================================================================
RCS file: /cvs/public/perlfaq/perlfaq7.pod,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- perlfaq7.pod 19 Oct 2004 22:53:50 -0000 1.17
+++ perlfaq7.pod 3 Nov 2004 22:54:08 -0000 1.18
@@ -1,6 +1,6 @@
=head1 NAME
-perlfaq7 - General Perl Language Issues ($Revision: 1.17 $, $Date: 2004/10/19 22:53:50 $)
+perlfaq7 - General Perl Language Issues ($Revision: 1.18 $, $Date: 2004/11/03 22:54:08 $)
=head1 DESCRIPTION
@@ -97,6 +97,16 @@
no warnings; # temporarily turn off warnings
$a = $b + $c; # I know these might be undef
}
+
+Additionally, you can enable and disable categories of warnings.
+You turn off the categories you want to ignore and you can still
+get other categories of warnings. See L<perllexwarn> for the
+complete details, including the category names and hierarchy.
+
+ {
+ no warnings 'uninitialized';
+ $a = $b + $c;
+ }
If you have an older version of Perl, the C<$^W> variable (documented
in L<perlvar>) controls runtime warnings for a block: