diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-22 22:22:51 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-24 09:25:18 -0800 |
commit | 6634bb9d0ed117be3584c9446cc6b05b93e3c773 (patch) | |
tree | 2ecac3a786603fe255eaba5fb68a92e19431dc01 /lib/feature.pm | |
parent | 4160ddbd34d65f63317a6e87331c497432389b1e (diff) | |
download | perl-6634bb9d0ed117be3584c9446cc6b05b93e3c773.tar.gz |
op.c: Use new feature bundle hints
Now ‘use v5.22’ and ‘use 5.005’ no longer have to load feature.pm
to enable the current feature bundle. All they do is twiddle bits
in PL_hints.
Since version declarations no longer call feature->unimport, there
may be junk left over in %^H (which we leave for speed’s sake), so
feature.pm has to delete that junk before enabling features.
Diffstat (limited to 'lib/feature.pm')
-rw-r--r-- | lib/feature.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index c9e188ba80..75c6666b55 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -299,7 +299,11 @@ sub import { croak("No features specified"); } if (my $features = current_bundle) { - # Features are enabled implicitly via bundle hints + # Features are enabled implicitly via bundle hints. + + # Delete any keys that may be left over from last time. + delete @^H{ values(%feature) }; + unshift @_, @$features; $^H |= $hint_mask; } |