diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-22 18:12:58 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-24 09:25:16 -0800 |
commit | 9c1e343294dbe2fdb560c07570dcae32cda1a4d8 (patch) | |
tree | ef69a0370bbf495a9f76fa3df54eb79f31c974b7 /lib/feature.pm | |
parent | 016d11cb9646d46996a4e27b640b2cd5f36a93c4 (diff) | |
download | perl-9c1e343294dbe2fdb560c07570dcae32cda1a4d8.tar.gz |
feature.pm: Add function for getting the current bundle
This is for when we switch over to using hints in $^H for feature bun-
dles. When $bundle_number == $hint_mask, it means that the hints in
%^H apply.
Diffstat (limited to 'lib/feature.pm')
-rw-r--r-- | lib/feature.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/feature.pm b/lib/feature.pm index 8f9467ab46..2c1d5266ef 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -290,6 +290,12 @@ 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; if (@_ == 0) { |