X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=a75f4854c8f39a978f66d1045367ecc3dffc0090;hb=ebf846e8113e65d2c3b2cddb7667b15a15a79813;hp=2208378ef691f3ab69f30643790b256100eb2cdb;hpb=10d690d1fe7982871290d495b50d467a09914bb1;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index 2208378..a75f485 100755 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -132,7 +132,11 @@ sub deploy_schema { my $sql; { local $/ = undef; $sql = ; } close IN; - ($schema->storage->dbh->do($_) || print "Error on SQL: $_\n") for split(/;\n/, $sql); + for my $chunk ( split (/;\s*\n+/, $sql) ) { + if ( $chunk =~ / ^ (?! --\s* ) \S /xm ) { # there is some real sql in the chunk - a non-space at the start of the string which is not a comment + $schema->storage->dbh->do($chunk) or print "Error on SQL: $chunk\n"; + } + } } return; }