From: Rafael Garcia-Suarez Date: Mon, 15 Jan 2007 12:41:28 +0000 (+0000) Subject: Document "no feature" (Michael G Schwern) X-Git-Tag: accepted/trunk/20130322.191538~16132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e36ed56d59bb479b1100b8ad146953872a4b692;p=platform%2Fupstream%2Fperl.git Document "no feature" (Michael G Schwern) p4raw-id: //depot/perl@29819 --- diff --git a/lib/feature.pm b/lib/feature.pm index 39eaf8e..fde2e6a 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -46,7 +46,7 @@ scope. =head2 Lexical effect Like other pragmas (C, for example), features have a lexical -effect. C will only make the feature "foo" available +effect. C will only make the feature "foo" available from that point to the end of the enclosing block. { @@ -55,6 +55,21 @@ from that point to the end of the enclosing block. } print "But not here.\n"; +=head2 C + +Features can also be turned off by using C. This too +has lexical effect. + + use feature 'say'; + say "say is available here"; + { + no feature 'say'; + print "But not here.\n"; + } + say "Yet it is here."; + +C with no features specified will turn off all features. + =head2 The 'switch' feature C tells the compiler to enable the Perl 6