@@ -863,20 +863,23 @@ C<defer>.
863
863
864
864
X<switch> X<case> X<given> X<when> X<default>
865
865
866
+ The C<switch> feature is discouraged for new code and is retained for
867
+ backward compatibility.
868
+
866
869
Starting from Perl 5.10.1 (well, 5.10.0, but it didn't work
867
870
right), you can say
868
871
869
872
use feature "switch";
870
873
871
- to enable an experimental switch feature. This is loosely based on an
874
+ to enable the switch feature. This is loosely based on an
872
875
old version of a Raku proposal, but it no longer resembles the Raku
873
876
construct. You also get the switch feature whenever you declare that your
874
877
code prefers to run under a version of Perl between 5.10 and 5.34. For
875
878
example:
876
879
877
880
use v5.14;
878
881
879
- Under the "switch" feature, Perl gains the experimental keywords
882
+ Under the "switch" feature, Perl gains the keywords
880
883
C<given>, C<when>, C<default>, C<continue>, and C<break>.
881
884
Starting from Perl 5.16, one can prefix the switch
882
885
keywords with C<CORE::> to access the feature without a C<use feature>
@@ -893,8 +896,8 @@ in the previous section could be rewritten as
893
896
default { $nothing = 1 }
894
897
}
895
898
896
- The C<foreach> is the non-experimental way to set a topicalizer.
897
- If you wish to use the highly experimental C<given>, that could be
899
+ The C<foreach> is another way to set a topicalizer.
900
+ If you wish to use C<given>, that could be
898
901
written like this:
899
902
900
903
use v5.10.1;
0 commit comments