perlfunc.pod grammar fixes
[p5sagit/p5-mst-13.2.git] / pod / perllexwarn.pod
index 7b3ce3c..f250fb4 100644 (file)
@@ -207,6 +207,8 @@ The current hierarchy is:
 
   all -+
        |
+       +- assertions
+       |
        +- closure
        |
        +- deprecated
@@ -296,8 +298,6 @@ The current hierarchy is:
        +- utf8
        |
        +- void
-       |
-       +- y2k
 
 Just like the "strict" pragma any of these categories can be combined
 
@@ -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
@@ -374,9 +381,9 @@ Consider the module C<MyMod::Abc> below.
     sub open {
         my $path = shift ;
         if ($path !~ m#^/#) {
-            warnings::warn("changing relative path to /tmp/")
+            warnings::warn("changing relative path to /var/abc")
                 if warnings::enabled();
-            $path = "/tmp/$path" ; 
+            $path = "/var/abc/$path";
         }
     }