This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
167f59c
)
feature.pm: Avoid repetition; save memory
author
Father Chrysostomos
<sprout@cpan.org>
Tue, 15 Nov 2011 12:58:50 +0000
(
04:58
-0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Tue, 15 Nov 2011 13:00:14 +0000
(
05:00
-0800)
lib/feature.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/feature.pm
b/lib/feature.pm
index
6ab650d
..
ce73e2d
100644
(file)
--- 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)
# 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.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.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"};
# special case
$feature_bundle{"5.9.5"} = $feature_bundle{"5.10"};