use Test::More;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+use Test::Requires {
+ 'Test::Pod::Coverage' => '1.04', # skip all if not installed
+};
# This is a stripped down version of all_pod_coverage_ok which lets us
# vary the trustme parameter per module.
use warnings;
use Test::More;
-eval 'use Test::Spelling;';
-plan skip_all => "Test::Spelling required for testing POD spelling" if $@;
+
+use Test::Requires {
+ 'Test::Spelling' => '0.01', # skip all if not installed
+};
my @stopwords;
for (<DATA>) {
use Test::More;
-eval "use Test::Pod 1.14";
-plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+use Test::Requires {
+ 'Test::Pod' => '1.14', # skip all if not installed
+};
all_pod_files_ok();
use Test::More;
-eval "use Test::NoTabs 0.8";
-plan skip_all => "Test::NoTabs 0.8 required for testing tabs" if $@;
+use Test::Requires {
+ 'Test::NoTabs' => '0.8', # skip all if not installed
+};
# Module::Install has tabs, so we can't check 'inc' or ideally '.'
all_perl_files_ok('lib', 't', 'xt');
use Test::More;
-eval <<'EOF';
-use File::Find::Rule;
-use Module::Info;
-EOF
-
-plan skip_all => 'File::Find::Rule and Module::Info required for testing version numbers' if $@;
-
+use Test::Requires {
+ 'File::Find::Rule' => '0.01', # skip all if not installed
+ 'Module::Info' => '0.01',
+};
my %versions;
for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in('lib' ) ) {