From: Florian Ragwitz Date: Thu, 14 Jan 2010 05:45:09 +0000 (+0000) Subject: Only set up the leakchecker for the tests that need it. X-Git-Tag: 5.80019~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=da1c9ff88c099e16c4771020f4b175c2b77a1dad Only set up the leakchecker for the tests that need it. That way we avoid the useless Devel::Cycle glob warnings. --- diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index a2fc0b2..1e4d5c4 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -20,7 +20,7 @@ our $VERSION = '0.01'; TestApp->config( name => 'TestApp', root => '/some/dir' ); -if (eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) { +if ($::setup_leakchecker && eval { Class::MOP::load_class('CatalystX::LeakChecker'); 1 }) { with 'CatalystX::LeakChecker'; has leaks => ( diff --git a/t/live_component_controller_context_closure.t b/t/live_component_controller_context_closure.t index 34318ea..767822d 100644 --- a/t/live_component_controller_context_closure.t +++ b/t/live_component_controller_context_closure.t @@ -13,6 +13,8 @@ BEGIN { use FindBin; use lib "$FindBin::Bin/lib"; +BEGIN { $::setup_leakchecker = 1 } + use Catalyst::Test 'TestApp'; {