summaryrefslogtreecommitdiff
path: root/lib/feature.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-03 22:01:41 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-03 22:01:41 +0000
commit712d05cf9bbf674929d5e38c5bb989d87c51f19b (patch)
tree2996ff933b30ab9796ddc54b982a3ec69d37de19 /lib/feature.pm
parent952306aca140c014b38ba5eb2ed71dffaa548f0f (diff)
downloadperl-712d05cf9bbf674929d5e38c5bb989d87c51f19b.tar.gz
Add "state" feature
p4raw-id: //depot/perl@28087
Diffstat (limited to 'lib/feature.pm')
-rw-r--r--lib/feature.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index d4975e411e..240d46dc46 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -1,6 +1,6 @@
package feature;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
# (feature name) => (internal name, used in %^H)
my %feature = (
@@ -8,10 +8,11 @@ my %feature = (
"~~" => "feature_~~",
say => "feature_say",
err => "feature_err",
+ state => "feature_state",
);
my %feature_bundle = (
- "5.10" => [qw(switch ~~ say err)],
+ "5.10" => [qw(switch ~~ say err state)],
);
@@ -81,13 +82,18 @@ operator from here to the end of the enclosing BLOCK.
C<err> is a low-precedence variant of the C<//> operator:
see C<perlop> for details.
+=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.
+
=head1 FEATURE BUNDLES
It's possible to load a whole slew of features in one go, using
a I<feature bundle>. The name of a feature bundle is prefixed with
a colon, to distinguish it from an actual feature. At present, the
only feature bundle is C<use feature ":5.10">, which is equivalent
-to C<use feature qw(switch ~~ say err)>.
+to C<use feature qw(switch ~~ say err state)>.
=cut