summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-02-28 23:30:30 +0100
committerNicholas Clark <nick@ccl4.org>2012-03-13 17:15:18 +0100
commit3a56084401f5e1a2432dd1e0a7aea0efd2ed28f4 (patch)
tree733752f33bef93f61e75596be9e5de81f11df3d1
parent9a53ca2e18f447e4e39ade4bdf9eb750a8c1a4a7 (diff)
downloadperl-smoke-me/Deparse-feature-detangle.tar.gz
In B::Deparse::_features_from_bundle(), don't call feature::current_bundle()smoke-me/Deparse-feature-detangle
Instead, directly access feature's package variables, as B::Deparse already does in 14 other places. (It also has its tentacles firmly into strict and warning's package variables - it's not fussy) feature::current_bundle() was not part of the documented API of feature either, so B::Deparse wasn't clean previously.
-rw-r--r--dist/B-Deparse/Deparse.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm
index 2bd6b6317d..eb24214eff 100644
--- a/dist/B-Deparse/Deparse.pm
+++ b/dist/B-Deparse/Deparse.pm
@@ -1451,10 +1451,7 @@ sub seq_subs {
sub _features_from_bundle {
my ($hints, $hh) = @_;
- local $^H = $hints;
- # Shh! Keep quite about this function. It is not to be
- # relied upon.
- foreach (@{feature::current_bundle()}) {
+ foreach (@{$feature::feature_bundle{@feature::hint_bundles[$hints >> $feature::hint_shift]}}) {
$hh->{$feature::feature{$_}} = 1;
}
return $hh;
@@ -1689,7 +1686,7 @@ sub keyword {
my $hh;
my $hints = $self->{hints} & $feature::hint_mask;
if ($hints && $hints != $feature::hint_mask) {
- $hh = _features_from_bundle($self->{hints});
+ $hh = _features_from_bundle($hints);
}
elsif ($hints) { $hh = $self->{'hinthash'} }
return "CORE::$name"