summaryrefslogtreecommitdiff
path: root/regen/feature.pl
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-02-20 19:35:33 -0500
committerRicardo Signes <rjbs@cpan.org>2012-02-22 09:36:57 -0500
commit39ec54a59ce332fc44e553f4e5eeceef88e8369e (patch)
treeee931a83b2545b9d7c343395d4caccffafe07abc /regen/feature.pl
parentac2b477c8b4b647797d42877de5b1a1d34c94073 (diff)
downloadperl-39ec54a59ce332fc44e553f4e5eeceef88e8369e.tar.gz
"no feature" now means reset to default
See https://rt.perl.org/rt3/Ticket/Display.html?id=108776 "no feature" now resets to the default feature set. To disable all features (which is likely to be a pretty special-purpose request, since it presumably won't match any named set of semantics) you can now write "no feature ':all'"
Diffstat (limited to 'regen/feature.pl')
-rwxr-xr-xregen/feature.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index 445c8b3a6e..f362396943 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -38,6 +38,7 @@ my %feature = (
# be changed to account.
my %feature_bundle = (
+ all => [ keys %feature ],
default => [qw(array_base)],
"5.9.5" => [qw(say state switch array_base)],
"5.10" => [qw(say state switch array_base)],
@@ -331,7 +332,7 @@ read_only_bottom_close_and_rename($h);
__END__
package feature;
-our $VERSION = '1.26';
+our $VERSION = '1.27';
FEATURES
@@ -392,7 +393,8 @@ has lexical effect.
}
say "Yet it is here.";
-C<no feature> with no features specified will turn off all features.
+C<no feature> with no features specified will reset to the default group. To
+disable I<all> features (an unusual request!) use C<no feature ':all'>.
=head1 AVAILABLE FEATURES
@@ -561,7 +563,7 @@ the C<use VERSION> construct. That is,
will do an implicit
- no feature;
+ no feature ':all';
use feature ':5.10';
and so on. Note how the trailing sub-version
@@ -635,11 +637,10 @@ sub unimport {
normalise_hints $features;
}
- # A bare C<no feature> should disable *all* features
+ # A bare C<no feature> should reset to the default bundle
if (!@_) {
- delete @^H{ values(%feature) };
- $^H &= ~ $hint_uni8bit;
- return;
+ $^H &= ~($hint_uni8bit|$hint_mask);
+ return;
}
while (@_) {