whitespace
[p5sagit/Try-Tiny.git] / t / context.t
index e25a09c..bc428c9 100644 (file)
@@ -2,18 +2,14 @@ use strict;
 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,
@@ -58,7 +54,7 @@ sub run {
   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';
@@ -66,7 +62,7 @@ sub run {
   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';