Re: [PATCH] Better version of the Aho-Corasick patch and lots of benchmarks.
[p5sagit/p5-mst-13.2.git] / lib / feature.pm
index 4f03329..238820e 100644 (file)
@@ -1,7 +1,6 @@
 package feature;
 
-our $VERSION = '1.00';
-$feature::hint_bits = 0x00020000; # HINT_LOCALIZE_HH
+our $VERSION = '1.01';
 
 # (feature name) => (internal name, used in %^H)
 my %feature = (
@@ -9,10 +8,12 @@ my %feature = (
     "~~"   => "feature_~~",
     say    => "feature_say",
     err    => "feature_err",
+    dor    => "feature_err",
+    state  => "feature_state",
 );
 
 my %feature_bundle = (
-    "5.10" => [qw(switch ~~ say err)],
+    "5.10" => [qw(switch ~~ say err state)],
 );
 
 
@@ -82,19 +83,26 @@ 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 'dor' feature
+
+The 'dor' feature is an alias for the 'err' feature.
+
+=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
 
 sub import {
-    $^H |= $feature::hint_bits;        # Need this or %^H won't work
-
     my $class = shift;
     if (@_ == 0) {
        require Carp;