bizarre smartmatch changes were removed in 5.27.10
[p5sagit/Try-Tiny.git] / t / when.t
index 23a3ef7..1a45db1 100644 (file)
--- a/t/when.t
+++ b/t/when.t
@@ -1,19 +1,18 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
 use Test::More;
 
 BEGIN {
-  plan skip_all => "Perl 5.10 required" unless eval { require 5.010; 1 };
-  plan tests => 6;
+  plan skip_all => 'Perl 5.010 is required' unless "$]" >= '5.010';
+  plan skip_all => 'Tests skipped on perl 5.27.{7,8,9} when smartmatch behaviour changed' if "$]" >= '5.027007' and "$]" < '5.027010';
+  plan tests => 5;
 }
 
 use Try::Tiny;
 
 use 5.010;
-no if $] >= 5.017011, warnings => 'experimental::smartmatch';
+no if "$]" >= 5.017011, warnings => 'experimental::smartmatch';
 
 my ( $foo, $bar, $other );