From: Shawn M Moore Date: Fri, 28 Nov 2008 20:54:36 +0000 (+0000) Subject: Mouse::Util provides throws_ok and lives_ok unless Test::Exception is version 0.27 X-Git-Tag: 0.19~150 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0fa84b98500301948bef369e9cc309bcf4d2733f;p=gitmo%2FMouse.git Mouse::Util provides throws_ok and lives_ok unless Test::Exception is version 0.27 --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index a27600b..7d0c97d 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -122,7 +122,7 @@ BEGIN { # ^^^^^ CODE TAKEN FROM MRO::COMPAT ^^^^^ }, # VVVVV CODE TAKEN FROM TEST::EXCEPTION VVVVV - 'Test::Exception' => do { + 'Test::Exception 0.27' => do { my $Tester; @@ -194,10 +194,12 @@ BEGIN { test => [qw/throws_ok lives_ok/], ); - for my $module_name (keys %dependencies) { + for my $module (keys %dependencies) { + my ($module_name, $version) = split ' ', $module; + my $loaded = do { local $SIG{__DIE__} = 'DEFAULT'; - eval "require $module_name; 1"; + eval "use $module (); 1"; }; $loaded{$module_name} = $loaded;