summaryrefslogtreecommitdiff
path: root/cpan/experimental
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-09-29 12:09:38 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-09-29 12:09:38 +0100
commit4177cbcef9e372eb623af46b4ffaaf9ff1c147c4 (patch)
tree5d616c70758a11db406daf40624de276da7f5797 /cpan/experimental
parent7e7942b7bb27d449f31c691a6c1262f300514949 (diff)
downloadperl-4177cbcef9e372eb623af46b4ffaaf9ff1c147c4.tar.gz
Update experimental to CPAN version 0.011
[DELTA] 0.011 2014-09-27 14:08:47+02:00 Europe/Amsterdam Clarified which order to apply pragmas [Grant McLean]
Diffstat (limited to 'cpan/experimental')
-rw-r--r--cpan/experimental/lib/experimental.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/cpan/experimental/lib/experimental.pm b/cpan/experimental/lib/experimental.pm
index 10a6a10516..b91ac7d4f0 100644
--- a/cpan/experimental/lib/experimental.pm
+++ b/cpan/experimental/lib/experimental.pm
@@ -1,5 +1,5 @@
package experimental;
-$experimental::VERSION = '0.010';
+$experimental::VERSION = '0.011';
use strict;
use warnings;
use version ();
@@ -112,7 +112,7 @@ experimental - Experimental features made easy
=head1 VERSION
-version 0.010
+version 0.011
=head1 SYNOPSIS
@@ -153,6 +153,26 @@ The supported features, documented further below, are:
smartmatch - allow the use of ~~
switch - allow the use of ~~, given, and when
+=head2 Ordering matters
+
+Using this pragma to 'enable an experimental feature' is another way of saying
+that this pragma will disable the warnings which would result from using that
+feature. Therefore, the order in which pragmas are applied is important. In
+particular, you probably want to enable experimental features I<after> you
+enable warnings:
+
+ use warnings;
+ use experimental 'smartmatch';
+
+You also need to take care with modules that enable warnings for you. A common
+example being Moose. In this example, warnings for the 'smartmatch' feature are
+first turned on by the warnings pragma, off by the experimental pragma and back
+on again by the Moose module (fix is to switch the last two lines):
+
+ use warnings;
+ use experimental 'smartmatch';
+ use Moose;
+
=head2 Disclaimer
Because of the nature of the features it enables, forward compatibility can not