X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Ffeature.pm;h=238820e72311ff34f310078f19012e6113be7db2;hb=3e5e55bd9605a684d64a1a191319fa2d90836414;hp=345b288a2a41f79e5bb235a6cc81bd7af828bf03;hpb=bc9b29dbf2ff006e91ae1d732887485497f58896;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/feature.pm b/lib/feature.pm index 345b288..238820e 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -1,7 +1,6 @@ package feature; -our $VERSION = '1.00'; -$feature::hint_bits = 0x04020000; # HINT_LOCALIZE_HH | HINT_HH_FOR_EVAL +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 is a low-precedence variant of the C operator: see C for details. +=head2 the 'dor' feature + +The 'dor' feature is an alias for the 'err' feature. + +=head2 the 'state' feature + +C tells the compiler to enable C +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. 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, which is equivalent -to C. +to C. =cut sub import { - $^H |= $feature::hint_bits; # Need this or %^H won't work - my $class = shift; if (@_ == 0) { require Carp;