summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Etheridge <ether@cpan.org>2016-11-12 13:51:55 -0800
committerKaren Etheridge <ether@cpan.org>2016-11-12 14:21:25 -0800
commit5e3b6a842a4879bcf5fa66a086c7995c6075e229 (patch)
treed0396fb6a8e2202fbe5049a4bb8ea85807b17a4d
parent497d57077e622f84b0aeb2be58092ee5726bcf1e (diff)
downloaduri-5e3b6a842a4879bcf5fa66a086c7995c6075e229.tar.gz
use Test::Needs for optional module checks in tests
developers now need to install Business::ISBN
-rw-r--r--Makefile.PL1
-rw-r--r--t/data.t9
-rw-r--r--t/urn-isbn.t9
3 files changed, 2 insertions, 17 deletions
diff --git a/Makefile.PL b/Makefile.PL
index a8729d4..3043c06 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -82,6 +82,7 @@ my %WriteMakefileArgs = (
requires => {
'Test::More' => '0.96',
'File::Temp' => '0',
+ 'Test::Needs' => '0',
},
},
},
diff --git a/t/data.t b/t/data.t
index 64920d9..31890ea 100644
--- a/t/data.t
+++ b/t/data.t
@@ -1,15 +1,6 @@
use strict;
use warnings;
-eval {
- require MIME::Base64;
-};
-if ($@) {
- print "1..0\n";
- print $@;
- exit;
-}
-
print "1..22\n";
use URI;
diff --git a/t/urn-isbn.t b/t/urn-isbn.t
index d8985f7..f512bde 100644
--- a/t/urn-isbn.t
+++ b/t/urn-isbn.t
@@ -1,14 +1,7 @@
use strict;
use warnings;
-eval {
- require Business::ISBN;
-};
-if ($@) {
- print "1..0 # Skipped: Needs the Business::ISBN module installed\n\n";
- print $@;
- exit;
-}
+use Test::Needs 'Business::ISBN';
print "1..13\n";