summaryrefslogtreecommitdiff
path: root/cpan/experimental
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-17 11:02:23 +0000
committerZefram <zefram@fysh.org>2017-12-17 11:02:23 +0000
commitda4e040f42421764ef069371d77c008e6b801f45 (patch)
treedad219b9c5a660c14705b6544fab2b3572bc2bd9 /cpan/experimental
parentb2cd5cb1d8b3c8a7a7f033784d5134d2fbd8cad8 (diff)
parentd6374f3d794e2a640258023e92e8d922409215ec (diff)
downloadperl-da4e040f42421764ef069371d77c008e6b801f45.tar.gz
merge branch zefram/dumb_match
Diffstat (limited to 'cpan/experimental')
-rw-r--r--cpan/experimental/t/basic.t10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpan/experimental/t/basic.t b/cpan/experimental/t/basic.t
index 5be845b38d..b54bd1199a 100644
--- a/cpan/experimental/t/basic.t
+++ b/cpan/experimental/t/basic.t
@@ -21,12 +21,10 @@ if ($] >= 5.010001) {
use experimental 'switch';
sub bar { 1 };
given(1) {
- when (\&bar) {
+ whereso (\&bar) {
pass("bar matches 1");
}
- default {
- fail("bar matches 1");
- }
+ fail("bar matches 1");
}
1;
END
@@ -35,8 +33,8 @@ END
if ($] >= 5.010001) {
is (eval <<'END', 1, 'smartmatch compiles') or diag $@;
use experimental 'smartmatch';
- sub baz { 1 };
- is(1 ~~ \&baz, 1, "is 1");
+ { package Baz; use overload "~~" => sub { 1 }; }
+ is(1 ~~ bless({}, "Baz"), 1, "is 1");
1;
END
}