Change 29818 by [EMAIL PROTECTED] on 2007/01/15 12:37:27

        Move the documentation of the lexical effect of feature.pm to its own
        section thus removing a lot of redundant redundant documentation about
        it cluttering up the feature documentation. (by Michael G Schwern)

Affected files ...

... //depot/perl/lib/feature.pm#11 edit

Differences ...

==== //depot/perl/lib/feature.pm#11 (text) ====
Index: perl/lib/feature.pm
--- perl/lib/feature.pm#10~29817~       2007-01-15 04:34:00.000000000 -0800
+++ perl/lib/feature.pm 2007-01-15 04:37:27.000000000 -0800
@@ -43,31 +43,43 @@
 and will be parsed only when the appropriate feature pragma is in
 scope.
 
+=head2 Lexical effect
+
+Like other pragmas (C<use strict>, for example), features have a lexical
+effect.  C<use feature qw(foo)> will only make the feature "foo" available
+from that point to the end of the enclosing block.
+
+    {
+        use feature 'say';
+        say "say is available here";
+    }
+    print "But not here.\n";
+
 =head2 The 'switch' feature
 
 C<use feature 'switch'> tells the compiler to enable the Perl 6
-given/when construct from here to the end of the enclosing BLOCK.
+given/when construct.
 
 See L<perlsyn/"Switch statements"> for details.
 
 =head2 The '~~' feature
 
 C<use feature '~~'> tells the compiler to enable the Perl 6
-smart match C<~~> operator from here to the end of the enclosing BLOCK.
+smart match C<~~> operator.
 
 See L<perlsyn/"Smart Matching in Detail"> for details.
 
 =head2 The 'say' feature
 
 C<use feature 'say'> tells the compiler to enable the Perl 6
-C<say> function from here to the end of the enclosing BLOCK.
+C<say> function.
 
 See L<perlfunc/say> for details.
 
 =head2 the 'err' feature
 
 C<use feature 'err'> tells the compiler to enable the C<err>
-operator from here to the end of the enclosing BLOCK.
+operator.
 
 C<err> is a low-precedence variant of the C<//> operator:
 see C<perlop> for details.
@@ -79,7 +91,7 @@
 =head2 the 'state' feature
 
 C<use feature 'state'> tells the compiler to enable C<state>
-variables from here to the end of the enclosing BLOCK.
+variables.
 
 See L<perlsub/"Persistent Private Variables"> for details.
 
End of Patch.

Reply via email to