This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade experimental from version 0.015 to 0.016
authorSteve Hay <steve.m.hay@googlemail.com>
Tue, 13 Oct 2015 12:14:15 +0000 (13:14 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Tue, 13 Oct 2015 12:14:15 +0000 (13:14 +0100)
Porting/Maintainers.pl
cpan/experimental/lib/experimental.pm

index 6e13627..3fa62fe 100755 (executable)
@@ -407,12 +407,9 @@ use File::Glob qw(:case);
     },
 
     'experimental' => {
-        'DISTRIBUTION' => 'LEONT/experimental-0.015.tar.gz',
+        'DISTRIBUTION' => 'LEONT/experimental-0.016.tar.gz',
         'FILES'        => q[cpan/experimental],
-        'EXCLUDED'     => [
-          qr{^t/release-.*\.t},
-          't/00-compile.t',
-        ],
+        'EXCLUDED'     => [qr{^xt/}],
     },
 
     'Exporter' => {
index 97c4af0..8d74751 100644 (file)
@@ -1,5 +1,5 @@
 package experimental;
-$experimental::VERSION = '0.015';
+$experimental::VERSION = '0.016';
 use strict;
 use warnings;
 use version ();
@@ -43,6 +43,7 @@ my %max_version = (
 );
 
 $_ = version->new($_) for values %min_version;
+$_ = version->new($_) for values %max_version;
 
 my %additional = (
        postderef  => ['postderef_qq'],
@@ -60,9 +61,6 @@ sub _enable {
                feature->import($pragma);
                _enable(@{ $additional{$pragma} }) if $additional{$pragma};
        }
-       elsif ($] >= $max_version{$pragma}) {
-               croak "Experimental feature $pragma has been removed from perl in version $max_version{$pragma}";
-       }
        elsif (not exists $min_version{$pragma}) {
                croak "Can't enable unknown feature $pragma";
        }
@@ -75,6 +73,9 @@ sub _enable {
                }
                croak "Need perl $stable or later for feature $pragma";
        }
+       elsif ($] >= ($max_version{$pragma} || 7)) {
+               croak "Experimental feature $pragma has been removed from perl in version $max_version{$pragma}";
+       }
 }
 
 sub import {
@@ -127,7 +128,7 @@ experimental - Experimental features made easy
 
 =head1 VERSION
 
-version 0.015
+version 0.016
 
 =head1 SYNOPSIS