From: Peter Rabbitson <ribasushi@cpan.org>
Date: Thu, 4 Jul 2013 03:48:34 +0000 (+0200)
Subject: fix tests failing on 5.6.x due to differing DESTROY semantics
X-Git-Tag: Try-Tiny-0.13~6^2~10
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2531688ce109de57a8e170677240a17df3f8528e;p=p5sagit%2FTry-Tiny.git

fix tests failing on 5.6.x due to differing DESTROY semantics
---

diff --git a/Changes b/Changes
index e26990e..f9edd71 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+
+  - fix tests failing on 5.6.x due to differing DESTROY semantics
+
 0.12
   - doc fixes
 
diff --git a/Makefile.PL b/Makefile.PL
index c4d2722..d2773b5 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,7 +2,7 @@ use strict;
 
 use ExtUtils::MakeMaker;
 
-require 5.005_04;
+require 5.006;
 
 WriteMakefile(
   NAME         => 'Try::Tiny',
@@ -13,6 +13,7 @@ WriteMakefile(
     'Test::More' => 0,
   },
   META_MERGE => {
+    dynamic_config => 0,
     resources => {
       homepage => 'https://github.com/doy/try-tiny.git',
       repository => 'git://github.com/doy/try-tiny.git',
diff --git a/t/context.t b/t/context.t
index e2f25b8..e25a09c 100644
--- a/t/context.t
+++ b/t/context.t
@@ -56,11 +56,19 @@ sub run {
     return 'catch';
   }
   finally {
-    is (wantarray, undef, "Proper VOID context in finally{} 1");
+    SKIP: {
+      skip "DESTROY() not called in void context on perl $]", 1
+        if $] < '5.008';
+      is (wantarray, undef, "Proper VOID context in finally{} 1");
+    }
     return 'finally';
   }
   finally {
-    is (wantarray, undef, "Proper VOID context in finally{} 2");
+    SKIP: {
+      skip "DESTROY() not called in void context on perl $]", 1
+        if $] < '5.008';
+      is (wantarray, undef, "Proper VOID context in finally{} 2");
+    }
     return 'finally';
   };
 }