Skip to content

Commit

Permalink
update experimental to 0.024 from CPAN
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed May 2, 2021
1 parent 98812e1 commit acd998d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 37 deletions.
4 changes: 0 additions & 4 deletions Porting/Maintainers.pl
Expand Up @@ -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' => {
Expand Down
5 changes: 3 additions & 2 deletions 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 ();
Expand Down Expand Up @@ -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',
);
Expand Down Expand Up @@ -134,7 +135,7 @@ experimental - Experimental features made easy
=head1 VERSION
version 0.022
version 0.024
=head1 SYNOPSIS
Expand Down
43 changes: 13 additions & 30 deletions cpan/experimental/t/basic.t
Expand Up @@ -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) {
Expand All @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion t/porting/customized.dat
Expand Up @@ -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

0 comments on commit acd998d

Please sign in to comment.