From: Peter Rabbitson Date: Mon, 28 Sep 2009 06:14:55 +0000 (+0000) Subject: Make maybe_plan insufficent-version-aware X-Git-Tag: v0.11008~83 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=559aa8a988d98d71d7fd88268e9ee38188f726bb;p=dbsrgits%2FSQL-Translator.git Make maybe_plan insufficent-version-aware --- diff --git a/lib/Test/SQL/Translator.pm b/lib/Test/SQL/Translator.pm index 2cbf82a..4d0eab9 100644 --- a/lib/Test/SQL/Translator.pm +++ b/lib/Test/SQL/Translator.pm @@ -466,12 +466,17 @@ sub maybe_plan { for my $module (@modules) { eval "use $module;"; - if ($@ && $@ =~ /Can't locate (\S+)/) { + next if !$@; + + if ($@ =~ /Can't locate (\S+)/) { my $mod = $1; $mod =~ s/\.pm$//; $mod =~ s#/#::#g; push @errors, $mod; } + elsif ($@ =~ /([\w\:]+ version [\d\.]+) required.+?this is only version/) { + push @errors, $1; + } } if (@errors) {