9 plan skip_all => "Perl 5.10 required" unless eval { require 5.010; 1 };
14 BEGIN { use_ok 'Try::Tiny' }
17 no if $] >= 5.017011, warnings => 'experimental::smartmatch';
19 my ( $foo, $bar, $other );
29 when (/bar/) { $bar++ };
30 when (/foo/) { $foo++ };
34 is( $_, "magic", '$_ not clobbered' );
36 ok( !$bar, "bar didn't match" );
37 ok( $foo, "foo matched" );
38 ok( !$other, "fallback didn't match" );