Revert my previous changes (rev 1722 reverted back to rev 1721)
[dbsrgits/SQL-Translator.git] / lib / Test / SQL / Translator.pm
index 79f412b..e69c5a2 100644 (file)
@@ -33,7 +33,7 @@ use SQL::Translator::Schema::Constants;
 
 use base qw(Exporter);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = '1.60';
+$VERSION = '1.59';
 @EXPORT = qw(
     schema_ok
     table_ok
@@ -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) {
@@ -552,7 +557,7 @@ tests based on their dependencies.
 
 The data structures given to the test subs don't have to include all the
 possible values, only the ones you expect to have changed. Any left out will be
-tested to make sure they are still at their default value. This is a usefull
+tested to make sure they are still at their default value. This is a useful
 check that you your parser hasn't accidentally set schema values you didn't
 expect it to.
 
@@ -634,8 +639,8 @@ schema file and test yaml file to compare it against.
 Mark D. Addison E<lt>mark.addison@itn.co.ukE<gt>, 
 Darren Chamberlain <darren@cpan.org>.
 
-Thanks to Ken YouensClark for the original table and field test code taken 
-from his mysql test.
+Thanks to Ken Y. Clark for the original table and field test code taken from
+his mysql test.
 
 =head1 SEE ALSO