This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update experimental to CPAN version 0.012
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 16 Oct 2014 11:27:15 +0000 (12:27 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 16 Oct 2014 11:27:15 +0000 (12:27 +0100)
  [DELTA]

0.012     2014-10-12 12:10:06+02:00 Europe/Amsterdam
          Added lvalue references feature

Porting/Maintainers.pl
cpan/experimental/lib/experimental.pm
cpan/experimental/t/basic.t

index 03c2744..157c3a7 100755 (executable)
@@ -413,7 +413,7 @@ use File::Glob qw(:case);
     },
 
     'experimental' => {
-        'DISTRIBUTION' => 'LEONT/experimental-0.011.tar.gz',
+        'DISTRIBUTION' => 'LEONT/experimental-0.012.tar.gz',
         'FILES'        => q[cpan/experimental],
         'EXCLUDED'     => [
           qr{^t/release-.*\.t},
index b91ac7d..efb853e 100644 (file)
@@ -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
index 239225b..5dc2eaf 100644 (file)
@@ -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;