summaryrefslogtreecommitdiff
path: root/regen/feature.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-02-28 23:54:10 +0100
committerNicholas Clark <nick@ccl4.org>2012-03-19 10:21:54 +0100
commit0c8d50175e8fc59ffe16de8607996905f18a8b28 (patch)
tree44055c663d8527a4e7742b154b5d759a400f5a0c /regen/feature.pl
parentd9ee6ccb5fa3d256d9d020e332ee8ba52706c2ae (diff)
downloadperl-0c8d50175e8fc59ffe16de8607996905f18a8b28.tar.gz
In feature.pm, inline current_bundle() into __common(), its only caller.
current_bundle() was added after 5.14.0 was released, so has never been in a stable release. Hence it's totally safe to kill it.
Diffstat (limited to 'regen/feature.pl')
-rwxr-xr-xregen/feature.pl11
1 files changed, 4 insertions, 7 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index 7f59847a9d..2a8d369ba2 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -583,12 +583,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;
@@ -614,7 +608,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) };