The core does not use these hints just yet, but feature.pm can start
setting them.
Currently, the hint bits for feature bundles (CURRENT_FEATURE_BUNDLE
in feature.h) are equal to FEATURE_BUNDLE_DEFAULT (0) by default.
feature.pm sets them to FEATURE_BUNDLE_CUSTOM when modifying
hint settings.
if (@_ == 0) {
croak("No features specified");
}
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints
+ unshift @_, @$features;
+ $^H |= $hint_mask;
+ }
while (@_) {
my $name = shift(@_);
if (substr($name, 0, 1) eq ":") {
sub unimport {
my $class = shift;
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints
+ # Pass them to import() to put them in a form we can handle.
+ import(undef, @$features);
+ $^H |= $hint_mask;
+ }
+
# A bare C<no feature> should disable *all* features
if (!@_) {
delete @^H{ values(%feature) };
if (@_ == 0) {
croak("No features specified");
}
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints
+ unshift @_, @$features;
+ $^H |= $hint_mask;
+ }
while (@_) {
my $name = shift(@_);
if (substr($name, 0, 1) eq ":") {
sub unimport {
my $class = shift;
+ if (my $features = current_bundle) {
+ # Features are enabled implicitly via bundle hints
+ # Pass them to import() to put them in a form we can handle.
+ import(undef, @$features);
+ $^H |= $hint_mask;
+ }
+
# A bare C<no feature> should disable *all* features
if (!@_) {
delete @^H{ values(%feature) };