summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-15 04:58:50 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-15 05:00:14 -0800
commit0d2bd2aac5a8ee613a8fdf0b0a601c608f500286 (patch)
treeac4e2843d23f30633ce6adb54803466c8c16108c /lib
parent167f59c18c1e17cd1060b030cf95ff2deb1d4833 (diff)
downloadperl-0d2bd2aac5a8ee613a8fdf0b0a601c608f500286.tar.gz
feature.pm: Avoid repetition; save memory
Diffstat (limited to 'lib')
-rw-r--r--lib/feature.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index 6ab650deb9..ce73e2df96 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -19,18 +19,18 @@ our $hint_uni8bit = 0x00000800;
# NB. the latest bundle must be loaded by the -E switch (see toke.c)
-my %feature_bundle = (
+our %feature_bundle = (
"5.10" => [qw(say state switch)],
"5.11" => [qw(say state switch unicode_strings)],
- "5.12" => [qw(say state switch unicode_strings)],
- "5.13" => [qw(say state switch unicode_strings)],
- "5.14" => [qw(say state switch unicode_strings)],
"5.15" => [qw(say state switch unicode_strings unicode_eval
evalbytes)],
- "5.16" => [qw(say state switch unicode_strings unicode_eval
- evalbytes)],
);
+# Each of these is the same as the previous bundle
+for(12...14, 16) {
+ $feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)}
+}
+
# special case
$feature_bundle{"5.9.5"} = $feature_bundle{"5.10"};