This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mention 'switch' is experimental in feature.pm
authorDoug Bell <madcityzen@gmail.com>
Sat, 18 Oct 2014 02:33:27 +0000 (21:33 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 18 Oct 2014 03:17:52 +0000 (20:17 -0700)
The other experimental features already have nice warnings in feature.pm

lib/feature.pm
regen/feature.pl

index 3f93f23..fe78881 100644 (file)
@@ -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.
 
index 1ffca38..b58381c 100755 (executable)
@@ -450,6 +450,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.