use warnings;
use Test::More;
+use Try::Tiny;
-BEGIN {
- plan tests =>
- 1 # use_ok
- + (4+1) * 2 # list/scalar with exception (try + catch + 2 x finally) + is_deeply
- + 4 # void with exception
- + (3+1) * 2 # list/scalar no exception (try + 2 x finally) + is_deeply
- + 3 # void no exception
- ;
-
- use_ok 'Try::Tiny';
-}
+plan tests =>
+ (4+1) * 2 # list/scalar with exception (try + catch + 2 x finally) + is_deeply
++ 4 # void with exception
++ (3+1) * 2 # list/scalar no exception (try + 2 x finally) + is_deeply
++ 3 # void no exception
+;
my $ctx_index = {
VOID => undef,
finally {
SKIP: {
skip "DESTROY() not called in void context on perl $]", 1
- if $] < '5.008';
+ if "$]" < '5.008';
is (wantarray, undef, "Proper VOID context in finally{} 1");
}
return 'finally';
finally {
SKIP: {
skip "DESTROY() not called in void context on perl $]", 1
- if $] < '5.008';
+ if "$]" < '5.008';
is (wantarray, undef, "Proper VOID context in finally{} 2");
}
return 'finally';