X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperllexwarn.pod;h=8c07c77e24211590b2091856886e5e901c6419a3;hb=5b7d14ffe3988c7f70fd9dc76be9c44168d17a62;hp=20f1875c0cbd18857e603ac62369e2539e034fb9;hpb=4358a253560c226dd674c77f83b913c071c4fa25;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index 20f1875..8c07c77 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 @@ -212,8 +214,6 @@ The current hierarchy is: all -+ | - +- assertions - | +- closure | +- deprecated @@ -236,6 +236,8 @@ The current hierarchy is: | | | +- unopened | + +- imprecision + | +- misc | +- numeric @@ -503,9 +505,9 @@ C. use Original; use Derived; use warnings 'Derived'; - my $a = new Original; + my $a = Original->new(); $a->doit(1); - my $b = new Derived; + my $b = Derived->new(); $a->doit(1); When this code is run only the C object, C<$b>, will generate @@ -516,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.