summaryrefslogtreecommitdiff
path: root/lib/feature.pm
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 21:41:00 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:17 -0800
commit3fff342746894147cd83bf8e339f63346475018a (patch)
tree937d56f67f7776316964c44a2b982d16afa52a88 /lib/feature.pm
parentc6b36e452c0b3d11d99efcc36f6a80394940f0c3 (diff)
downloadperl-3fff342746894147cd83bf8e339f63346475018a.tar.gz
Eliminate ‘negative’ features
Now that we have hints in $^H to indicate the default feature bun- dle, there is no need for entries in %^H that turn features off by their presence.
Diffstat (limited to 'lib/feature.pm')
-rw-r--r--lib/feature.pm12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index 6f7af31771..c9e188ba80 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -12,15 +12,12 @@ my %feature = (
state => 'feature_state',
switch => 'feature_switch',
evalbytes => 'feature_evalbytes',
+ array_base => 'feature_arybase',
current_sub => 'feature___SUB__',
unicode_eval => 'feature_unieval',
unicode_strings => 'feature_unicode',
);
-my %default_feature = (
- array_base => 'feature_noarybase',
-);
-
our %feature_bundle = (
"5.10" => [qw(array_base say state switch)],
"5.11" => [qw(array_base say state switch unicode_strings)],
@@ -320,10 +317,7 @@ sub import {
next;
}
if (!exists $feature{$name}) {
- if (!exists $default_feature{$name}) {
unknown_feature($name);
- }
- delete $^H{$default_feature{$name}}; next;
}
$^H{$feature{$name}} = 1;
$^H |= $hint_uni8bit if $name eq 'unicode_strings';
@@ -344,7 +338,6 @@ sub unimport {
if (!@_) {
delete @^H{ values(%feature) };
$^H &= ~ $hint_uni8bit;
- @^H{ values(%default_feature) } = (1) x keys %default_feature;
return;
}
@@ -362,10 +355,7 @@ sub unimport {
next;
}
if (!exists($feature{$name})) {
- if (!exists $default_feature{$name}) {
unknown_feature($name);
- }
- $^H{$default_feature{$name}} = 1; next;
}
else {
delete $^H{$feature{$name}};