[Bast-commits] r4078 - DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema

captainL at dev.catalyst.perl.org captainL at dev.catalyst.perl.org
Thu Feb 14 00:27:14 GMT 2008


Author: captainL
Date: 2008-02-14 00:27:14 +0000 (Thu, 14 Feb 2008)
New Revision: 4078

Modified:
   DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm
Log:
fixed versioned loading split bug

Modified: DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm	2008-02-14 00:11:08 UTC (rev 4077)
+++ DBIx-Class/0.08/branches/versioned_enhancements/lib/DBIx/Class/Schema/Versioned.pm	2008-02-14 00:27:14 UTC (rev 4078)
@@ -309,7 +309,9 @@
 
   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;




More information about the Bast-commits mailing list