diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/feature.pm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index 3f29d781b8..87b42aa916 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -299,12 +299,6 @@ bundle is automatically loaded instead. =cut -sub current_bundle { - my $bundle_number = $^H & $hint_mask; - return if $bundle_number == $hint_mask; - return $feature_bundle{$hint_bundles[$bundle_number >> $hint_shift]}; -} - sub import { my $class = shift; @@ -330,7 +324,10 @@ sub unimport { sub __common { my $import = shift; - if (my $features = current_bundle) { + my $bundle_number = $^H & $hint_mask; + my $features = $bundle_number != $hint_mask + && $feature_bundle{$hint_bundles[$bundle_number >> $hint_shift]}; + if ($features) { # Features are enabled implicitly via bundle hints. # Delete any keys that may be left over from last time. delete @^H{ values(%feature) }; |