[Bast-commits] r6653 - in DBIx-Class/0.08/branches/run_file_against_storage: lib/DBIx/Class/Storage t

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Fri Jun 12 17:20:17 GMT 2009


Author: jnapiorkowski
Date: 2009-06-12 17:20:17 +0000 (Fri, 12 Jun 2009)
New Revision: 6653

Modified:
   DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm
   DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t
Log:
all tests and deployment stuff working probably again after subtle regex tweaks

Modified: DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm	2009-06-12 15:38:14 UTC (rev 6652)
+++ DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm	2009-06-12 17:20:17 UTC (rev 6653)
@@ -2097,7 +2097,6 @@
 Given a string, returns all the individual SQL statements in that String
 as an Array.
 
-
 =cut
 
 sub _split_line_into_statements {
@@ -2108,13 +2107,12 @@
     |
     '[^']+'
     |
-    .+?(?=$deliminator)
+    .+?(?=$deliminator|.)
   /x;
 
   return ($line=~m/$maybe_quoted*?$deliminator/g);
 }
 
-
 =head2 _normalize_statements_from_lines 
 
   my @statements = $storage->_normalize_statements_from_lines(@lines)

Modified: DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t
===================================================================
--- DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t	2009-06-12 15:38:14 UTC (rev 6652)
+++ DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t	2009-06-12 17:20:17 UTC (rev 6653)
@@ -35,7 +35,7 @@
  "Correctly split";
 
 is_deeply [$storage->_split_line_into_statements("insert into artist(artistid,name) values(888888,'xxx;yyy;zzz');")],
-  ["insert into artist(artistid,name) values(888888,'xxx;yyy;zzz');"],
+  ["insert into artist(artistid,name) values(888888,'xxx;yyy;zzz');",""],
   "Correctly split";
 
 ok my @lines = $storage->_normalize_lines(<$fh>), 'Got some lines';
@@ -142,5 +142,3 @@
 ok $storage->run_file_against_storage(qw/t share simple.sql/), 'executed the simple';
 ok $storage->run_file_against_storage(qw/t share killer.sql/), 'executed the killer';
 
-use Data::Dump qw/dump/;
-warn dump $storage->_split_line_into_statements("insert into artist(artistid,name) values(888888,'xxx;yyy;zzz');");




More information about the Bast-commits mailing list