[Bast-commits] r5425 - in DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class: Schema Storage

ash at dev.catalyst.perl.org ash at dev.catalyst.perl.org
Sat Feb 7 17:52:29 GMT 2009


Author: ash
Date: 2009-02-07 17:52:29 +0000 (Sat, 07 Feb 2009)
New Revision: 5425

Modified:
   DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Schema/Versioned.pm
   DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Storage/DBI.pm
Log:
Fix versioning test

Modified: DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Schema/Versioned.pm	2009-02-07 17:21:13 UTC (rev 5424)
+++ DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Schema/Versioned.pm	2009-02-07 17:52:29 UTC (rev 5425)
@@ -141,8 +141,7 @@
     open $fh, "<$file" or warn("Can't open upgrade file, $file ($!)");
     my @data = split(/;\n/, join('', <$fh>));
     close($fh);
-    @data = grep { $_ && $_ !~ /^-- / } @data;
-    @data = grep { $_ !~ /^(BEGIN TRANACTION|COMMIT)/m } @data;
+    @data = grep { $_ && $_ !~ /^\s*$/s &&  $_ !~ /^-- / } @data;
 
     $self->_filedata(\@data);
 

Modified: DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Storage/DBI.pm	2009-02-07 17:21:13 UTC (rev 5424)
+++ DBIx-Class/0.08/branches/stopgap/lib/DBIx/Class/Storage/DBI.pm	2009-02-07 17:52:29 UTC (rev 5425)
@@ -1513,8 +1513,8 @@
       next if($line =~ /^--/);
       next if(!$line);
 #      next if($line =~ /^DROP/m);
-      next if($line =~ /^BEGIN TRANSACTION/m);
-      next if($line =~ /^COMMIT/m);
+      next if($line =~ /^BEGIN(?: TRANSACTION)?/im);
+      next if($line =~ /^COMMIT/mi);
       next if $line =~ /^\s+$/; # skip whitespace only
       $self->_query_start($line);
       eval {




More information about the Bast-commits mailing list