diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-22 10:05:16 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-24 09:25:13 -0800 |
commit | 88da30d732bdf35367c4008b31d9d07c1022434a (patch) | |
tree | b9bbdc89329350f8af6ae9e844c3e389a2a894cf /lib/feature.pm | |
parent | 11b275493edbf41bb61a1176850d2f49ab83398a (diff) | |
download | perl-88da30d732bdf35367c4008b31d9d07c1022434a.tar.gz |
feature.pl: Gen %feature_bundle from %UniqueBundles
%UniqueBundles was added for generating constants in feature.h, but
we can use it for feature.pm’s %feature_bundle as well, simplify-
ing the code.
This eliminates this piece of code in feature.pm, spelling it
out longhand:
# Each of these is the same as the previous bundle
for (12,13,14,16) {
$feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)}
}
While that code might be neat, it would make the generation code
unduly complex. (It was designed for hand-editing anyway.)
Diffstat (limited to 'lib/feature.pm')
-rw-r--r-- | lib/feature.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index a3cfdbe37e..34727f0b2e 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -25,15 +25,15 @@ our %feature_bundle = ( "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)], ); +$feature_bundle{"5.12"} = $feature_bundle{"5.11"}; +$feature_bundle{"5.13"} = $feature_bundle{"5.11"}; +$feature_bundle{"5.14"} = $feature_bundle{"5.11"}; +$feature_bundle{"5.16"} = $feature_bundle{"5.15"}; +$feature_bundle{"5.9.5"} = $feature_bundle{"5.10"}; -# Each of these is the same as the previous bundle -for (12,13,14,16) { - $feature_bundle{"5.$_"} = $feature_bundle{"5.".($_-1)} -} # 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. |