Skip to content

Commit e3d27be

Browse files
rwp0tonycoz
authored andcommitted
Mark __CLASS__ as experimental
Fixes #22288
1 parent c844eac commit e3d27be

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pod/perldiag.pod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ letter.
4444

4545
=over 4
4646

47+
=item __CLASS__ is experimental
48+
49+
(S experimental::class) This warning is emitted if you use the C<__CLASS__>
50+
keyword of C<use feature 'class'>. This keyword is currently
51+
experimental and its behaviour may change in future releases of Perl.
52+
4753
=item accept() on closed socket %s
4854

4955
(W closed) You tried to do an accept on a closed socket. Did you forget

toke.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8003,6 +8003,8 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
80038003
: newSVOP(OP_RUNCV, 0, &PL_sv_undef));
80048004

80058005
case KEY___CLASS__:
8006+
Perl_ck_warner_d(aTHX_
8007+
packWARN(WARN_EXPERIMENTAL__CLASS), "__CLASS__ is experimental");
80068008
FUN0(OP_CLASSNAME);
80078009

80088010
case KEY_AUTOLOAD:

0 commit comments

Comments
 (0)