Skip to content

Commit ab79bb2

Browse files
tonycozhaarg
authored andcommitted
perlop/smartmatch: now a "feature" and discouraged, not experimental
1 parent 4257d4f commit ab79bb2

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

pod/perlop.pod

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,21 @@ C<use v5.36> (or higher) declaration in the current scope.
682682

683683
=head2 Smartmatch Operator
684684

685-
First available in Perl 5.10.1 (the 5.10.0 version behaved differently),
686-
binary C<~~> does a "smartmatch" between its arguments. This is mostly
685+
The C<smartmatch> feature is discouraged for new code and retained for
686+
backward compatibility.
687+
688+
The smartmatch operator was introduced in 5.10.0 had significant
689+
changes in 5.10.1. It is enabled by default and in all feature
690+
bundles up to 5.40. To use smartmatch with a later feature bundle you
691+
will need enable it explicitly:
692+
693+
use v5.42;
694+
use feature "smartmatch";
695+
696+
Binary C<~~> does a "smartmatch" between its arguments. This is mostly
687697
used implicitly in the C<when> construct described in L<perlsyn>, although
688698
not all C<when> clauses call the smartmatch operator. Unique among all of
689-
Perl's operators, the smartmatch operator can recurse. The smartmatch
690-
operator is L<experimental|perlpolicy/experimental> and its behavior is
691-
subject to change.
699+
Perl's operators, the smartmatch operator can recurse.
692700

693701
It is also unique in that all other Perl operators impose a context
694702
(usually string or numeric context) on their operands, autoconverting

0 commit comments

Comments
 (0)