Skip to content

Commit 302c9e0

Browse files
committed
Add experimental warnings to new any() and all()
1 parent fc55fbe commit 302c9e0

File tree

6 files changed

+37
-8
lines changed

6 files changed

+37
-8
lines changed

lib/B/Deparse-core.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ sub testit {
9191
else {
9292
package test;
9393
use subs ();
94+
no warnings 'experimental::any_all';
9495
import subs $keyword;
9596
$code = "no warnings 'syntax'; no strict 'vars'; sub { ${vars}() = $expr }";
9697
$code = "use feature 'isa';\n$code" if $keyword eq "isa";

lib/warnings.pm

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

pod/perldiag.pod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ removed in a future Perl version:
7575
use feature "refaliasing";
7676
\$x = \$y;
7777

78+
=item all is experimental
79+
80+
(S experimental::any_all) This warning is emitted if you use the C<all>
81+
keyword of C<use feature 'any_all'>. This keyword is currently
82+
experimental and its behaviour may change in future releases of Perl.
83+
7884
=item '%c' allowed only after types %s in %s
7985

8086
(F) The modifiers '!', '<' and '>' are allowed in pack() or unpack() only
@@ -182,6 +188,12 @@ which 'splits' output into two streams, such as
182188
}
183189
close OUT;
184190

191+
=item any is experimental
192+
193+
(S experimental::any_all) This warning is emitted if you use the C<any>
194+
keyword of C<use feature 'any_all'>. This keyword is currently
195+
experimental and its behaviour may change in future releases of Perl.
196+
185197
=item Applying %s to %s will act on scalar(%s)
186198

187199
(W misc) The pattern match (C<//>), substitution (C<s///>), and

regen/warnings.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# This script is normally invoked from regen.pl.
1818

19-
$VERSION = '1.71';
19+
$VERSION = '1.72';
2020

2121
BEGIN {
2222
require './regen/regen_lib.pl';
@@ -158,6 +158,8 @@ BEGIN
158158
[ 5.035, DEFAULT_ON],
159159
'experimental::class' =>
160160
[ 5.037, DEFAULT_ON ],
161+
'experimental::any_all' =>
162+
[ 5.041, DEFAULT_ON ],
161163
}],
162164

163165
'missing' => [ 5.021, DEFAULT_OFF],

toke.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7999,7 +7999,8 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
79997999
LOP(OP_ACCEPT,XTERM);
80008000

80018001
case KEY_all:
8002-
/* TODO: experimental warning */
8002+
Perl_ck_warner_d(aTHX_
8003+
packWARN(WARN_EXPERIMENTAL__ANY_ALL), "all is experimental");
80038004
LOP(OP_ALLSTART, XREF);
80048005

80058006
case KEY_and:
@@ -8008,7 +8009,8 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
80088009
OPERATOR(ANDOP);
80098010

80108011
case KEY_any:
8011-
/* TODO: experimental warning */
8012+
Perl_ck_warner_d(aTHX_
8013+
packWARN(WARN_EXPERIMENTAL__ANY_ALL), "any is experimental");
80128014
LOP(OP_ANYSTART, XREF);
80138015

80148016
case KEY_atan2:

warnings.h

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

0 commit comments

Comments
 (0)