X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperllexwarn.pod;h=7b3ce3ce20bce5a01ae6463089d0dfd663bd82e5;hb=d7133549e15d907b18e0c1873e57e635dc9d6424;hp=cd76f3af402ed52b9bbe4f73b5d8b257df2132e6;hpb=08540116c788d6f1e67757a00e334989e55f0cfc;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index cd76f3a..7b3ce3c 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -209,6 +209,8 @@ The current hierarchy is: | +- closure | + +- deprecated + | +- exiting | +- glob @@ -219,6 +221,8 @@ The current hierarchy is: | | | +- exec | | + | +- layer + | | | +- newline | | | +- pipe @@ -263,8 +267,6 @@ The current hierarchy is: | | | +- bareword | | - | +- deprecated - | | | +- digit | | | +- parenthesis @@ -283,6 +285,8 @@ The current hierarchy is: | +- taint | + +- threads + | +- uninitialized | +- unpack @@ -312,6 +316,11 @@ C pragma in a given scope the cumulative effect is additive. To determine which category a specific warning has been assigned to see L. +Note: In Perl 5.6.1, the lexical warnings category "deprecated" was a +sub-category of the "syntax" category. It is now a top-level category +in its own right. + + =head2 Fatal Warnings The presence of the word "FATAL" in the category list will escalate any @@ -364,8 +373,9 @@ Consider the module C below. sub open { my $path = shift ; - if (warnings::enabled() && $path !~ m#^/#) { - warnings::warn("changing relative path to /tmp/"); + if ($path !~ m#^/#) { + warnings::warn("changing relative path to /tmp/") + if warnings::enabled(); $path = "/tmp/$path" ; } }