@@ -60,6 +60,47 @@ XXX For a release on a stable branch, this section aspires to be:
60
60
61
61
[ List each incompatible change as a =head2 entry ]
62
62
63
+ =head2 Switch and Smart Match operator reinstated
64
+
65
+ The "switch" feature and the smartmatch operator, C<~~>, were introduced in
66
+ v5.10. Their behavior was significantly changed in v5.10.1. When the
67
+ "experiment" system was added in v5.18.0, switch and smartmatch were
68
+ retroactively declared experimental. Over the years, proposals to fix or
69
+ supplement the features have come and gone.
70
+
71
+ They were deprecated in Perl v5.38.0 and scheduled for removal in Perl
72
+ 5.42.0, and entirely removed in Perl 5.41.3.
73
+
74
+ After some discussion these have been re-instated.
75
+
76
+ Using them no longer produces a deprecation warning.
77
+
78
+ Switch itself still requires the C<switch> feature, which is enabled
79
+ by default for feature bundles from v5.9.5 through to v5.34. Switch
80
+ remains disabled in feature bundles 5.35 and later, but can be
81
+ separately enabled:
82
+
83
+ # no switch here
84
+ use v5.10;
85
+ # switch here
86
+ use v5.36;
87
+ # no switch here
88
+ use feature "switch";
89
+ # switch here
90
+
91
+ Smart match now requires the C<smartmatch> feature, which is enabled
92
+ by default and included in all feature bundles up to 5.40. It is
93
+ disabled for the 5.41 feature bundle and later, but can be separately
94
+ enabled:
95
+
96
+ # smartmatch here
97
+ use v5.41;
98
+ # no smartmatch here
99
+ use feature "smartmatch";
100
+ # smartmatch here
101
+
102
+ [L<GH #22752|https://github.com/Perl/perl5/issues/22752>]
103
+
63
104
=head1 Deprecations
64
105
65
106
XXX Any deprecated features, syntax, modules etc. should be listed here.
0 commit comments