plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value'
unless $ENV{MOOSE_TEST_MD};
-eval 'use Test::DependentModules qw( test_all_dependents test_module );';
-plan skip_all => 'This test requires Test::DependentModules'
- if $@;
+use Test::Requires {
+ 'Test::DependentModules' => '0.01', # skip all if not installed
+};
+use Test::DependentModules qw( test_all_dependents test_module );
$ENV{PERL_TEST_DM_LOG_DIR} = abs_path('.');