summaryrefslogtreecommitdiff
path: root/cpan/experimental
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-10-16 12:27:15 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2014-10-16 12:27:15 +0100
commit9c71c2c57ff730c06c50ae800ee5e7652be91895 (patch)
tree9862d07517b4f0eee0794aeea99eb5728a3d1e62 /cpan/experimental
parent8717a761ed4c6bc51add235060c04edd152bcdb6 (diff)
downloadperl-9c71c2c57ff730c06c50ae800ee5e7652be91895.tar.gz
Update experimental to CPAN version 0.012
[DELTA] 0.012 2014-10-12 12:10:06+02:00 Europe/Amsterdam Added lvalue references feature
Diffstat (limited to 'cpan/experimental')
-rw-r--r--cpan/experimental/lib/experimental.pm14
-rw-r--r--cpan/experimental/t/basic.t9
2 files changed, 20 insertions, 3 deletions
diff --git a/cpan/experimental/lib/experimental.pm b/cpan/experimental/lib/experimental.pm
index b91ac7d4f0..efb853e5f2 100644
--- a/cpan/experimental/lib/experimental.pm
+++ b/cpan/experimental/lib/experimental.pm
@@ -1,5 +1,5 @@
package experimental;
-$experimental::VERSION = '0.011';
+$experimental::VERSION = '0.012';
use strict;
use warnings;
use version ();
@@ -25,6 +25,7 @@ my %min_version = (
fc => '5.16.0',
lexical_topic => '5.10.0',
lexical_subs => '5.18.0',
+ lvalue_refs => '5.21.5',
postderef => '5.20.0',
postderef_qq => '5.20.0',
regex_sets => '5.18.0',
@@ -58,7 +59,13 @@ sub _enable {
croak "Can't enable unknown feature $pragma";
}
elsif ($min_version{$pragma} > $]) {
- croak "Need perl $min_version{$pragma} or later for feature $pragma";
+ my $stable = $min_version{$pragma};
+ if ($stable->{version}[1] % 2) {
+ $stable = version->new(
+ "5.".($stable->{version}[1]+1).'.0'
+ );
+ }
+ croak "Need perl $stable or later for feature $pragma";
}
}
@@ -112,7 +119,7 @@ experimental - Experimental features made easy
=head1 VERSION
-version 0.011
+version 0.012
=head1 SYNOPSIS
@@ -146,6 +153,7 @@ The supported features, documented further below, are:
array_base - allow the use of $[ to change the starting index of @array
autoderef - allow push, each, keys, and other built-ins on references
lexical_topic - allow the use of lexical $_ via "my $_"
+ lvalue_refs - allow aliasing via \$x = \$y
postderef - allow the use of postfix dereferencing expressions, including
in interpolating strings
regex_sets - allow extended bracketed character classes in regexps
diff --git a/cpan/experimental/t/basic.t b/cpan/experimental/t/basic.t
index 239225b8a3..5dc2eafab9 100644
--- a/cpan/experimental/t/basic.t
+++ b/cpan/experimental/t/basic.t
@@ -50,5 +50,14 @@ if ($] >= 5.018) {
END
}
+if ($] >= 5.021005) {
+ is (eval <<'END', 1, 'lvalue ref compiles') or diag $@;
+ use experimental 'lvalue_refs';
+ \@a = \@b;
+ is(\@a, \@b, '@a and @b are the same after \@a=\@b');
+ 1;
+END
+}
+
done_testing;