summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/try/given_when.t5
-rw-r--r--t/try/when.t2
2 files changed, 6 insertions, 1 deletions
diff --git a/t/try/given_when.t b/t/try/given_when.t
index 48d006d..4cf8460 100644
--- a/t/try/given_when.t
+++ b/t/try/given_when.t
@@ -5,6 +5,8 @@ use Test::More;
use lib 't/try/lib';
use 5.014;
+no if $] >= 5.018, warnings => 'experimental::smartmatch';
+
use Try;
my ( $error, $topic );
@@ -24,7 +26,8 @@ given ("foo") {
is( $error, "blah\n", "error caught" );
{
- local $TODO = "perhaps a workaround can be found";
+ local $TODO = "perhaps a workaround can be found"
+ if $] < 5.018;
is( $topic, $error, 'error is also in $_' );
}
diff --git a/t/try/when.t b/t/try/when.t
index 60322b7..6a0c075 100644
--- a/t/try/when.t
+++ b/t/try/when.t
@@ -5,6 +5,8 @@ use Test::More;
use lib 't/try/lib';
use 5.014;
+no if $] >= 5.018, warnings => 'experimental::smartmatch';
+
use Try;
my ( $foo, $bar, $other );