From acd998d76362b480eb8e517c712de155d2659d03 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Sat, 1 May 2021 22:27:57 -0400 Subject: [PATCH] update experimental to 0.024 from CPAN --- Porting/Maintainers.pl | 4 --- cpan/experimental/lib/experimental.pm | 5 ++-- cpan/experimental/t/basic.t | 43 ++++++++------------------- t/porting/customized.dat | 1 - 4 files changed, 16 insertions(+), 37 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 7c584b68de6c..25905df689e7 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -410,10 +410,6 @@ package Maintainers; '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 b29e0a7b54f8..2d58dfdf25bd 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 f39cc230ed36..248b56c50156 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 ef7d2c4b5f32..1156cd9fa207 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