summaryrefslogtreecommitdiff
path: root/lib/feature.pm
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-21 22:46:41 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:12 -0800
commit69bcf1d3d727aba8df8f279ed93ee56eea0cd15f (patch)
tree9995de9d66593dd15087c9573b5b4813b8b8857e /lib/feature.pm
parentebd7756fdcb7a944c6473f8738ec9e5a4d2e4669 (diff)
downloadperl-69bcf1d3d727aba8df8f279ed93ee56eea0cd15f.tar.gz
Create regen/feature.pl
This script generates lib/feature.pm. Soon it will be made to gener- ate other files, too.
Diffstat (limited to 'lib/feature.pm')
-rw-r--r--lib/feature.pm38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index c482e5bce3..a3cfdbe37e 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -1,8 +1,12 @@
+# -*- buffer-read-only: t -*-
+# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+# This file is built by regen/feature.pl.
+# Any changes made here will be lost!
+
package feature;
our $VERSION = '1.25';
-# (feature name) => (internal name, used in %^H)
my %feature = (
say => 'feature_say',
state => 'feature_state',
@@ -13,33 +17,27 @@ my %feature = (
unicode_strings => 'feature_unicode',
);
-# These work backwards--the presence of the hint elem disables the feature:
my %default_feature = (
- array_base => 'feature_no$[',
+ array_base => 'feature_no$[',
);
-# This gets set (for now) in $^H as well as in %^H,
-# for runtime speed of the uc/lc/ucfirst/lcfirst functions.
-# See HINT_UNI_8_BIT in perl.h.
-our $hint_uni8bit = 0x00000800;
-
-# NB. the latest bundle must be loaded by the -E switch (see toke.c)
-
our %feature_bundle = (
- "default" => [keys %default_feature],
- "5.10" => [qw(say state switch array_base)],
- "5.11" => [qw(say state switch unicode_strings array_base)],
- "5.15" => [qw(say state switch unicode_strings unicode_eval
- evalbytes current_sub)],
+ "5.10" => [qw(array_base say state switch)],
+ "5.11" => [qw(array_base say state switch unicode_strings)],
+ "5.15" => [qw(current_sub evalbytes say state switch unicode_eval unicode_strings)],
+ "5.9.5" => [qw(array_base say state switch)],
+ "default" => [qw(array_base)],
);
+
# Each of these is the same as the previous bundle
-for(12...14, 16) {
+for (12,13,14,16) {
$feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)}
}
-
-# special case
-$feature_bundle{"5.9.5"} = $feature_bundle{"5.10"};
+# This gets set (for now) in $^H as well as in %^H,
+# for runtime speed of the uc/lc/ucfirst/lcfirst functions.
+# See HINT_UNI_8_BIT in perl.h.
+our $hint_uni8bit = 0x00000800;
# TODO:
# - think about versioned features (use feature switch => 2)
@@ -372,3 +370,5 @@ sub croak {
}
1;
+
+# ex: set ro: