Skip to content

Commit ac8ba64

Browse files
bookdemerphq
authored andcommitted
Document that smartmatch is deprecated and will be removed in 5.42
1 parent d798806 commit ac8ba64

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

lib/feature.pm

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

pod/perldiag.pod

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,11 +2643,10 @@ C<getpwnam> operator returned an invalid UIC.
26432643
forget to check the return value of your socket() call? See
26442644
L<perlfunc/getsockopt>.
26452645

2646-
=item given is experimental
2646+
=item given is deprecated
26472647

2648-
(S experimental::smartmatch) C<given> depends on smartmatch, which
2649-
is experimental, so its behavior may change or even be removed
2650-
in any future release of perl. See the explanation under
2648+
(D deprecated) C<given> depends on smartmatch, which is deprecated. It
2649+
will be removed in Perl 5.42. See the explanation under
26512650
L<perlsyn/Experimental Details on given and when>.
26522651

26532652
=item Global symbol "%s" requires explicit package name (did you forget to
@@ -6038,14 +6037,13 @@ so there can't be any left to fill later parameters.
60386037
overload it: Perl refuses to use the object's underlying structure
60396038
for the smart match.
60406039

6041-
=item Smartmatch is experimental
6040+
=item Smartmatch is deprecated
60426041

6043-
(S experimental::smartmatch) This warning is emitted if you
6044-
use the smartmatch (C<~~>) operator. This is currently an experimental
6045-
feature, and its details are subject to change in future releases of
6046-
Perl. Particularly, its current behavior is noticed for being
6047-
unnecessarily complex and unintuitive, and is very likely to be
6048-
overhauled.
6042+
(D deprecated) This warning is emitted if you
6043+
use the smartmatch (C<~~>) operator. This is a deprecated
6044+
feature. Particularly, its behavior is noticed for being
6045+
unnecessarily complex and unintuitive, and it will be removed
6046+
in Perl 5.42.
60496047

60506048
=item Sorry, hash keys must be smaller than 2**31 bytes
60516049

@@ -8025,12 +8023,12 @@ but in actual fact, you got
80258023

80268024
So put in parentheses to say what you really mean.
80278025

8028-
=item when is experimental
8026+
=item when is deprecated
80298027

8030-
(S experimental::smartmatch) C<when> depends on smartmatch, which is
8031-
experimental. Additionally, it has several special cases that may
8032-
not be immediately obvious, and their behavior may change or
8033-
even be removed in any future release of perl. See the explanation
8028+
(D deprecated) C<when> depends on smartmatch, which is
8029+
deprecated. Additionally, it has several special cases that may
8030+
not be immediately obvious, and it will be removed in Perl 5.42.
8031+
See the explanation
80348032
under L<perlsyn/Experimental Details on given and when>.
80358033

80368034
=item Wide character in %s

regen/feature.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ =head2 The 'switch' feature
605605
See L<perlsyn/"Switch Statements"> for details.
606606
607607
This feature is available starting with Perl 5.10.
608+
It is deprecated starting with Perl 5.38, and using
609+
C<given>, C<when> or smartmatch will throw a warning.
610+
It will be removed in Perl 5.42.
608611
609612
=head2 The 'unicode_strings' feature
610613

0 commit comments

Comments
 (0)