Skip to content

Commit

Permalink
mention 'switch' is experimental in feature.pm
Browse files Browse the repository at this point in the history
The other experimental features already have nice warnings in feature.pm
  • Loading branch information
preaction authored and Father Chrysostomos committed Oct 18, 2014
1 parent f0ee386 commit 7caca87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/feature.pm
Expand Up @@ -135,6 +135,12 @@ This feature is available starting with Perl 5.10.
=head2 The 'switch' feature
B<WARNING>: Because the L<smartmatch operator|perlop/"Smartmatch Operator"> is
experimental, Perl will warn when you use this feature, unless you have
explicitly disabled the warning:
no warnings "experimental::smartmatch";
C<use feature 'switch'> tells the compiler to enable the Perl 6
given/when construct.
Expand Down
6 changes: 6 additions & 0 deletions regen/feature.pl
Expand Up @@ -450,6 +450,12 @@ =head2 The 'state' feature
=head2 The 'switch' feature
B<WARNING>: Because the L<smartmatch operator|perlop/"Smartmatch Operator"> is
experimental, Perl will warn when you use this feature, unless you have
explicitly disabled the warning:
no warnings "experimental::smartmatch";
C<use feature 'switch'> tells the compiler to enable the Perl 6
given/when construct.
Expand Down

0 comments on commit 7caca87

Please sign in to comment.