9 plan skip_all => "Perl 5.10 required" unless eval { require 5.010; 1 };
14 BEGIN { use_ok 'Try::Tiny' }
18 my ( $foo, $bar, $other );
28 when (/bar/) { $bar++ };
29 when (/foo/) { $foo++ };
33 is( $_, "magic", '$_ not clobbered' );
35 ok( !$bar, "bar didn't match" );
36 ok( $foo, "foo matched" );
37 ok( !$other, "fallback didn't match" );