From: Luke Saunders Date: Thu, 14 Feb 2008 00:27:14 +0000 (+0000) Subject: fixed versioned loading split bug X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d89d86046f9b0bc02bcedef7000bb7ceec6a33ca;p=dbsrgits%2FDBIx-Class-Historic.git fixed versioned loading split bug --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 9416583..150c3c9 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -309,7 +309,9 @@ sub _read_sql_file { my $fh; open $fh, "<$file" or warn("Can't open upgrade file, $file ($!)"); - my @data = split(/[;\n]/, join('', <$fh>)); + my @data = split(/\n/, join('', <$fh>)); + @data = grep(!/^--/, @data); + @data = split(/;/, join('', @data)); close($fh); @data = grep { $_ && $_ !~ /^-- / } @data; @data = grep { $_ !~ /^(BEGIN TRANACTION|COMMIT)/m } @data;