diff options
author | Ricardo Signes <rjbs@cpan.org> | 2012-02-20 19:35:33 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-02-22 09:36:57 -0500 |
commit | 39ec54a59ce332fc44e553f4e5eeceef88e8369e (patch) | |
tree | ee931a83b2545b9d7c343395d4caccffafe07abc /t/lib/feature | |
parent | ac2b477c8b4b647797d42877de5b1a1d34c94073 (diff) | |
download | perl-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 't/lib/feature')
-rw-r--r-- | t/lib/feature/bundle | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/t/lib/feature/bundle b/t/lib/feature/bundle index 7e1479f4e3..429e68ebd0 100644 --- a/t/lib/feature/bundle +++ b/t/lib/feature/bundle @@ -85,9 +85,9 @@ no feature; use feature ":default"; $[ = 1; print qw[a b c][2], "\n"; -use feature ":5.16"; # should not disable anything; no feature does that +use feature ":5.16"; # should not disable anything; no feature ':all' does that print qw[a b c][2], "\n"; -no feature; +no feature ':all'; print qw[a b c][2], "\n"; use feature ":5.16"; print qw[a b c][2], "\n"; @@ -97,3 +97,23 @@ b b c c +######## +# "no feature" +use feature ':5.16'; # turns array_base off +no feature; # resets to :default, thus turns array_base on +$[ = 1; +print qw[a b c][2], "\n"; +EXPECT +Use of assignment to $[ is deprecated at - line 4. +b +######## +# "no feature 'all" +$[ = 1; +print qw[a b c][2], "\n"; +no feature ':all'; # turns array_base (and everything else) off +$[ = 1; +print qw[a b c][2], "\n"; +EXPECT +Use of assignment to $[ is deprecated at - line 2. +Assigning non-zero to $[ is no longer possible at - line 5. +b |