summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@semiotic.systems>2021-05-01 22:27:57 -0400
committerRicardo Signes <rjbs@semiotic.systems>2021-05-02 11:37:01 -0400
commitacd998d76362b480eb8e517c712de155d2659d03 (patch)
treec4f5a755a0ab547b4d62bb5c7a9f592b60a54ddc
parent98812e18d0be2057929745853c138f82fc39c4de (diff)
downloadperl-acd998d76362b480eb8e517c712de155d2659d03.tar.gz
update experimental to 0.024 from CPAN
-rwxr-xr-xPorting/Maintainers.pl4
-rw-r--r--cpan/experimental/lib/experimental.pm5
-rw-r--r--cpan/experimental/t/basic.t43
-rw-r--r--t/porting/customized.dat1
4 files changed, 16 insertions, 37 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 7c584b68de..25905df689 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -410,10 +410,6 @@ use File::Glob qw(:case);
'DISTRIBUTION' => 'LEONT/experimental-0.022.tar.gz',
'FILES' => q[cpan/experimental],
'EXCLUDED' => [qr{^xt/}],
- 'CUSTOMIZED' => [
- # smartmatch changes
- 't/basic.t',
- ],
},
'Exporter' => {
diff --git a/cpan/experimental/lib/experimental.pm b/cpan/experimental/lib/experimental.pm
index b29e0a7b54..2d58dfdf25 100644
--- a/cpan/experimental/lib/experimental.pm
+++ b/cpan/experimental/lib/experimental.pm
@@ -1,5 +1,5 @@
package experimental;
-$experimental::VERSION = '0.022';
+$experimental::VERSION = '0.024';
use strict;
use warnings;
use version ();
@@ -38,6 +38,7 @@ my %min_version = (
signatures => '5.20.0',
state => '5.10.0',
switch => '5.10.0',
+ try => '5.33.6',
unicode_eval => '5.16.0',
unicode_strings => '5.12.0',
);
@@ -134,7 +135,7 @@ experimental - Experimental features made easy
=head1 VERSION
-version 0.022
+version 0.024
=head1 SYNOPSIS
diff --git a/cpan/experimental/t/basic.t b/cpan/experimental/t/basic.t
index f39cc230ed..248b56c501 100644
--- a/cpan/experimental/t/basic.t
+++ b/cpan/experimental/t/basic.t
@@ -5,6 +5,8 @@ use warnings;
use Test::More 0.89;
+plan skip_all => 'This module is a no-op on perls earlier than 5.010' if "$]" < 5.010000;
+
local $SIG{__WARN__} = sub { fail("Got unexpected warning"); diag($_[0]) };
if ($] >= 5.010000) {
@@ -17,45 +19,26 @@ END
}
if ($] >= 5.010001) {
- if (eval '
- no warnings "experimental";
- use feature "switch";
- if(0) { when(3) {} }
- 1;
- ') {
- is (eval <<'END', 1, 'switch compiles') or diag $@;
- use experimental 'switch';
- sub bar { 1 };
- given(1) {
- when (\&bar) {
- pass("bar matches 1");
- }
- default {
- fail("bar matches 1");
- }
+ is (eval <<'END', 1, 'switch compiles') or diag $@;
+ use experimental 'switch';
+ sub bar { 1 };
+ given(1) {
+ when (\&bar) {
+ pass("bar matches 1");
}
- 1;
-END
- } else {
- is (eval <<'END', 1, 'switch compiles') or diag $@;
- use experimental 'switch';
- sub bar { 1 };
- given(1) {
- whereso (\&bar) {
- pass("bar matches 1");
- }
+ default {
fail("bar matches 1");
}
- 1;
-END
}
+ 1;
+END
}
if ($] >= 5.010001) {
is (eval <<'END', 1, 'smartmatch compiles') or diag $@;
use experimental 'smartmatch';
- { package Baz; use overload "~~" => sub { 1 }; }
- is(1 ~~ bless({}, "Baz"), 1, "is 1");
+ sub baz { 1 };
+ is(1 ~~ \&baz, 1, "is 1");
1;
END
}
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index ef7d2c4b5f..1156cd9fa2 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -23,7 +23,6 @@ Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm 582be34c077c9ff44d99914724a0cc2
Test::Harness cpan/Test-Harness/t/source.t aaa3939591114c0c52ecd44159218336d1f762b9
Win32API::File cpan/Win32API-File/File.pm 8fd212857f821cb26648878b96e57f13bf21b99e
Win32API::File cpan/Win32API-File/File.xs beb870fed4490d2faa547b4a8576b8d64d1d27c5
-experimental cpan/experimental/t/basic.t cb9da8dd05b854375809872a05dd32637508d5da
version cpan/version/lib/version.pm 9a4d4c2a89cc95c0c946de6742d6df41e546c12c
version vutil.c 5fd47f345ad3e612f9f3fe440cccbcbf88264bb6
version vxs.inc d23e4fac6211d3b35b367e80ef23b8ab5fa9d0eb