summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-02-25 14:26:13 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-02-25 14:26:13 -0800
commitda5b542134ae843ebd50725db33b1ce6d82af1c1 (patch)
treea5ae95a1be912045dfafb4c76323157e5f200926
parent5d826eaef15535c7ea548c9031da0da0406c4941 (diff)
downloadperl-da5b542134ae843ebd50725db33b1ce6d82af1c1.tar.gz
Don’t ‘normalise’ hints for bare ‘no feature’
‘Normalise’ in this case means to set $^H to indicate that features are in %^H (FEATURE_BUNDLE_CUSTOM) and to make %^H contain the current feature set. Since ‘no feature’ sets the default feature bundle in $^H, this is unnecessary in that case.
-rw-r--r--lib/feature.pm10
-rwxr-xr-xregen/feature.pl10
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index 33f48dc021..58380e9db6 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -348,17 +348,17 @@ sub import {
sub unimport {
my $class = shift;
- if (my $features = current_bundle) {
- # Features are enabled implicitly via bundle hints.
- normalise_hints $features;
- }
-
# A bare C<no feature> should reset to the default bundle
if (!@_) {
$^H &= ~($hint_uni8bit|$hint_mask);
return;
}
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints.
+ normalise_hints $features;
+ }
+
while (@_) {
my $name = shift;
if (substr($name, 0, 1) eq ":") {
diff --git a/regen/feature.pl b/regen/feature.pl
index 0844e44575..aaac912ca2 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -632,17 +632,17 @@ sub import {
sub unimport {
my $class = shift;
- if (my $features = current_bundle) {
- # Features are enabled implicitly via bundle hints.
- normalise_hints $features;
- }
-
# A bare C<no feature> should reset to the default bundle
if (!@_) {
$^H &= ~($hint_uni8bit|$hint_mask);
return;
}
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints.
+ normalise_hints $features;
+ }
+
while (@_) {
my $name = shift;
if (substr($name, 0, 1) eq ":") {