X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperllexwarn.pod;h=1eb8b30087ddefaa92ec2e706aba48a61b59a2d6;hb=7360c6b444ea6e19b6583f9530f845bee19c7921;hp=bed349f9cfd6f6ddf45ace2d0f07533c0a37efbd;hpb=584420f022db57225e9644b9c6668ff9f567984a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index bed349f..1eb8b30 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -5,10 +5,12 @@ perllexwarn - Perl Lexical Warnings =head1 DESCRIPTION -The C pragma is a replacement for both the command line -flag B<-w> and the equivalent Perl variable, C<$^W>. +The C pragma enables to control precisely what warnings are +to be enabled in which parts of a Perl program. It's a more flexible +alternative for both the command line flag B<-w> and the equivalent Perl +variable, C<$^W>. -The pragma works just like the existing "strict" pragma. +This pragma works just like the C pragma. This means that the scope of the warning pragma is limited to the enclosing block. It also means that the pragma setting will not leak across files (via C, C or C). This allows @@ -234,6 +236,8 @@ The current hierarchy is: | | | +- unopened | + +- imprecision + | +- misc | +- numeric @@ -395,7 +399,7 @@ Consider the module C below. 1; The call to C will create a new warnings category -called "MyMod::abc", i.e. the new category name matches the current +called "MyMod::Abc", i.e. the new category name matches the current package name. The C function in the module will display a warning message if it gets given a relative path as a parameter. This warnings will only be displayed if the code that uses C has actually @@ -514,21 +518,6 @@ a warning. Notice also that the warning is reported at the line where the object is first used. -=head1 TODO - - perl5db.pl - The debugger saves and restores C<$^W> at runtime. I haven't checked - whether the debugger will still work with the lexical warnings - patch applied. - - diagnostics.pm - I *think* I've got diagnostics to work with the lexical warnings - patch, but there were design decisions made in diagnostics to work - around the limitations of C<$^W>. Now that those limitations are gone, - the module should be revisited. - - document calling the warnings::* functions from XS - =head1 SEE ALSO L, L.