Skip to content

Commit 9a4e5a8

Browse files
committed
Rename the 'any' and 'all' features to 'keyword_any' and 'keyword_all'
This avoids confusion with the use feature ':all' ability
1 parent c98e792 commit 9a4e5a8

File tree

10 files changed

+83
-87
lines changed

10 files changed

+83
-87
lines changed

feature.h

Lines changed: 58 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

keywords.c

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

keywords.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature.pm

Lines changed: 6 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pod/perldiag.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ removed in a future Perl version:
7878
=item all is experimental
7979

8080
(S experimental::all) This warning is emitted if you use the C<all>
81-
keyword of C<use feature 'all'>. This keyword is currently
81+
keyword of C<use feature 'keyword_all'>. This keyword is currently
8282
experimental and its behaviour may change in future releases of Perl.
8383

8484
=item '%c' allowed only after types %s in %s
@@ -191,7 +191,7 @@ which 'splits' output into two streams, such as
191191
=item any is experimental
192192

193193
(S experimental::any) This warning is emitted if you use the C<any>
194-
keyword of C<use feature 'any'>. This keyword is currently
194+
keyword of C<use feature 'keyword_any'>. This keyword is currently
195195
experimental and its behaviour may change in future releases of Perl.
196196

197197
=item Applying %s to %s will act on scalar(%s)

pod/perlfunc.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ is roughly equivalent to
832832
if( @strings == grep { length $_ } @strings ) ...
833833

834834
This operator is only available if the
835-
L<C<all> feature|feature/"The 'all' feature"> is enabled.
835+
L<C<keyword_all> feature|feature/"The 'keyword_all' feature"> is enabled.
836836

837837
It is currently considered B<experimental>, and will issue a compile-time
838838
warning in the category C<experimental::all> unless that category is silenced.
@@ -862,7 +862,7 @@ is roughly equivalent to
862862
if( grep { length $_ } @strings ) ...
863863

864864
This operator is only available if the
865-
L<C<any> feature|feature/"The 'any' feature"> is enabled.
865+
L<C<keyword_any> feature|feature/"The 'keyword_any' feature"> is enabled.
866866

867867
It is currently considered B<experimental>, and will issue a compile-time
868868
warning in the category C<experimental::any> unless that category is silenced.

regen/feature.pl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ BEGIN
5151
defer
5252
module_true
5353
class
54-
any
55-
all
54+
keyword_any
55+
keyword_all
5656
smartmatch
5757
)
5858
);
@@ -618,7 +618,7 @@ sub longest {
618618

619619
__END__
620620
package feature;
621-
our $VERSION = '1.94';
621+
our $VERSION = '1.95';
622622
623623
FEATURES
624624
@@ -1081,7 +1081,7 @@ =head2 The 'apostrophe_as_package_separator' feature
10811081
conversion from C<'> to C<::>, including for symbolic references, is
10821082
always enabled.
10831083
1084-
=head2 The 'any' feature
1084+
=head2 The 'keyword_any' feature
10851085
10861086
B<WARNING>: This feature is still experimental and the implementation may
10871087
change or be removed in future versions of Perl. For this reason, Perl will
@@ -1093,7 +1093,7 @@ =head2 The 'any' feature
10931093
This allow testing whether any of the values in a list satisfy a given
10941094
condition, with short-circuiting behaviour as soon as it finds one.
10951095
1096-
=head2 The 'all' feature
1096+
=head2 The 'keyword_all' feature
10971097
10981098
B<WARNING>: This feature is still experimental and the implementation may
10991099
change or be removed in future versions of Perl. For this reason, Perl will
@@ -1106,10 +1106,6 @@ =head2 The 'all' feature
11061106
condition, with short-circuiting behaviour as soon as it finds one that does
11071107
not.
11081108
1109-
B<Note:> remember that this enables one specific feature whose name is C<all>;
1110-
it does not enable all of the features. This is not C<use feature ':all'>.
1111-
For that, see the section below.
1112-
11131109
=head1 FEATURE BUNDLES
11141110
11151111
It's possible to load multiple features together, using

regen/keywords.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
# If this hash changes, make sure the equivalent hash in
3737
# lib/B/Deparse.pm (%feature_keywords) is also updated.
3838
my %feature_kw = (
39+
# keyword => feature name
3940
state => 'state',
4041
say => 'say',
4142
given => 'switch',
@@ -56,8 +57,8 @@
5657
method => 'class',
5758
ADJUST => 'class',
5859
__CLASS__ => 'class',
59-
any => 'any',
60-
all => 'all',
60+
any => 'keyword_any',
61+
all => 'keyword_all',
6162
);
6263

6364
my %pos = map { ($_ => 1) } @{$by_strength{'+'}};

t/lib/croak/op

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ EXPECT
328328
Downgrading a use VERSION declaration to below v5.11 is not permitted at - line 3.
329329
########
330330
# any with deferred LIST expression
331-
use feature 'any';
331+
use feature 'keyword_any';
332332
no warnings 'experimental::any';
333333
any length, qw( a b c )
334334
EXPECT
335335
syntax error at - line 4, near "any length"
336336
Execution of - aborted due to compilation errors.
337337
########
338338
# all with deferred LIST expression
339-
use feature 'all';
339+
use feature 'keyword_all';
340340
no warnings 'experimental::all';
341341
all length, qw( a b c )
342342
EXPECT

t/op/any_all.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BEGIN {
66
set_up_inc('../lib');
77
}
88

9-
use feature qw( any all );
9+
use feature qw( keyword_any keyword_all );
1010
no warnings qw( experimental::any experimental::all );
1111

1212
# Basic true/false testing

0 commit comments

Comments
 (0)