my $feature_bundle_mask = 0x1c000000;
+sub _features_from_bundle {
+ my ($hints, $hh) = @_;
+ require feature;
+ local $^H = $hints;
+ # Shh! Keep quite about this function. It is not to be
+ # relied upon.
+ foreach (@{feature::current_bundle()}) {
+ $hh->{$feature::feature{$_}} = 1;
+ }
+ return $hh;
+}
+
# Notice how subs and formats are inserted between statements here;
# also $[ assignments and pragmas.
sub pp_nextstate {
for grep /^feature_/, keys %{$self->{'hinthash'}};
}
else { $self->{'hinthash'} = {} }
- local $^H = $from;
- foreach (@{feature::current_bundle()}) {
- $self->{'hinthash'}{$feature::feature{$_}} = 1;
- }
+ $self->{'hinthash'}
+ = _features_from_bundle($from, $self->{'hinthash'});
}
else {
my $bundle =
my $hh;
my $hints = $self->{hints} & $feature_bundle_mask;
if ($hints && $hints != $feature_bundle_mask) {
- require feature;
- local $^H = $self->{hints};
- # Shh! Keep quite about this function. It is not to be
- # relied upon.
- foreach (@{feature::current_bundle()}) {
- $hh->{$feature::feature{$_}} = 1;
- }
+ $hh = _features_from_bundle($self->{hints});
}
elsif ($hints) { $hh = $self->{'hinthash'} }
return "CORE::$name"