diff options
author | Ricardo Signes <rjbs@semiotic.systems> | 2021-05-01 22:27:57 -0400 |
---|---|---|
committer | Ricardo Signes <rjbs@semiotic.systems> | 2021-05-02 11:37:01 -0400 |
commit | acd998d76362b480eb8e517c712de155d2659d03 (patch) | |
tree | c4f5a755a0ab547b4d62bb5c7a9f592b60a54ddc /cpan/experimental | |
parent | 98812e18d0be2057929745853c138f82fc39c4de (diff) | |
download | perl-acd998d76362b480eb8e517c712de155d2659d03.tar.gz |
update experimental to 0.024 from CPAN
Diffstat (limited to 'cpan/experimental')
-rw-r--r-- | cpan/experimental/lib/experimental.pm | 5 | ||||
-rw-r--r-- | cpan/experimental/t/basic.t | 43 |
2 files changed, 16 insertions, 32 deletions
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 } |