From: Vincent Pit <vince@profvince.com>
Date: Sat, 26 Sep 2009 09:53:10 +0000 (+0200)
Subject: Kwalitee test overhaul
X-Git-Tag: rt63842~15
X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=697c6d5cf14e3ed42ac17432c9de6567e199f564;p=perl%2Fmodules%2FB-RecDeparse.git

Kwalitee test overhaul
---

diff --git a/t/99-kwalitee.t b/t/99-kwalitee.t
index 7775e60..185d4ce 100644
--- a/t/99-kwalitee.t
+++ b/t/99-kwalitee.t
@@ -5,5 +5,17 @@ use warnings;
 
 use Test::More;
 
-eval { require Test::Kwalitee; Test::Kwalitee->import() };
-plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;
+eval { require Test::Kwalitee; };
+plan(skip_all => 'Test::Kwalitee not installed') if $@;
+
+SKIP: {
+ eval { Test::Kwalitee->import(); };
+ if (my $err = $@) {
+  1 while chomp $err;
+  require Test::Builder;
+  my $Test = Test::Builder->new;
+  my $plan = $Test->has_plan;
+  $Test->skip_all($err) if not defined $plan or $plan eq 'no_plan';
+  skip $err => $plan - $Test->current_test;
+ }
+}