From: Dave Rolsky Date: Mon, 27 Sep 2010 21:49:23 +0000 (-0500) Subject: Skip in BEGIN block to avoid loading modules if we're not going to run the tests X-Git-Tag: 1.15~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=52c21688bec679cd6caa4efb8fcca863dfac4057 Skip in BEGIN block to avoid loading modules if we're not going to run the tests --- diff --git a/xt/author/test-my-dependents.t b/xt/author/test-my-dependents.t index e1b6c50..c507d8a 100644 --- a/xt/author/test-my-dependents.t +++ b/xt/author/test-my-dependents.t @@ -4,8 +4,10 @@ use warnings; use Cwd qw( abs_path ); use Test::More; -plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value' - unless $ENV{MOOSE_TEST_MD}; +BEGIN { + plan skip_all => 'This test will not run unless you set MOOSE_TEST_MD to a true value' + unless $ENV{MOOSE_TEST_MD}; +} use Test::Requires { 'Test::DependentModules' => '0.01', # skip all if not installed