diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-02-28 22:57:31 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-02-28 22:57:31 +0100 |
commit | 764455d648b5ba6c32ab47ed783865304d65a524 (patch) | |
tree | e47a4642ec27722e8e7eb011aae462e970759380 | |
parent | 010b90a910922b6cf21bb0e5ae0c36ce9b0ff914 (diff) | |
download | perl-764455d648b5ba6c32ab47ed783865304d65a524.tar.gz |
In B::Deparse, refactor the two places that feature::current_bundle()
Converge the code, so that it's easy to extract out into a subroutine.
-rw-r--r-- | dist/B-Deparse/Deparse.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index de768d9a7c..c1032705d8 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -1515,11 +1515,9 @@ sub pp_nextstate { } else { $self->{'hinthash'} = {} } local $^H = $from; - %{$self->{'hinthash'}} = ( - %{$self->{'hinthash'}}, - map +($feature::feature{$_} => 1), - @{feature::current_bundle()}, - ); + foreach (@{feature::current_bundle()}) { + $self->{'hinthash'}{$feature::feature{$_}} = 1; + } } else { my $bundle = @@ -1689,7 +1687,9 @@ sub keyword { local $^H = $self->{hints}; # Shh! Keep quite about this function. It is not to be # relied upon. - $hh = { map +($feature::feature{$_} => 1), @{feature::current_bundle()} }; + foreach (@{feature::current_bundle()}) { + $hh->{$feature::feature{$_}} = 1; + } } elsif ($hints) { $hh = $self->{'hinthash'} } return "CORE::$name" |