[Bast-commits] r8889 - in SQL-Abstract/1.x/trunk: . lib/SQL t

semifor at dev.catalyst.perl.org semifor at dev.catalyst.perl.org
Fri Mar 5 16:53:59 GMT 2010


Author: semifor
Date: 2010-03-05 16:53:59 +0000 (Fri, 05 Mar 2010)
New Revision: 8889

Modified:
   SQL-Abstract/1.x/trunk/Changes
   SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
   SQL-Abstract/1.x/trunk/t/05in_between.t
Log:
fixed open outer parens in a multi-line literal


Modified: SQL-Abstract/1.x/trunk/Changes
===================================================================
--- SQL-Abstract/1.x/trunk/Changes	2010-03-04 18:39:54 UTC (rev 8888)
+++ SQL-Abstract/1.x/trunk/Changes	2010-03-05 16:53:59 UTC (rev 8889)
@@ -1,5 +1,7 @@
 Revision history for SQL::Abstract
 
+    - fixed open outer parens for a multi-line literal
+
 revision 1.61  2010-02-05 16:28 (UTC)
 ----------------------------
     - Allow INSERT to take additional attributes

Modified: SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm	2010-03-04 18:39:54 UTC (rev 8888)
+++ SQL-Abstract/1.x/trunk/lib/SQL/Abstract.pm	2010-03-05 16:53:59 UTC (rev 8889)
@@ -928,7 +928,7 @@
 # adding them back in the corresponding method
 sub _open_outer_paren {
   my ($self, $sql) = @_;
-  $sql = $1 while $sql =~ /^ \s* \( (.*) \) \s* $/x;
+  $sql = $1 while $sql =~ /^ \s* \( (.*) \) \s* $/xs;
   return $sql;
 }
 

Modified: SQL-Abstract/1.x/trunk/t/05in_between.t
===================================================================
--- SQL-Abstract/1.x/trunk/t/05in_between.t	2010-03-04 18:39:54 UTC (rev 8888)
+++ SQL-Abstract/1.x/trunk/t/05in_between.t	2010-03-05 16:53:59 UTC (rev 8889)
@@ -115,6 +115,16 @@
   {
     parenthesis_significant => 1,
     where => {
+      status => { -in => \"(SELECT status_codes\nFROM states)" },
+    },
+    # failed to open outer parens on a multi-line query in 1.61 (semifor)
+    stmt => " WHERE ( status IN ( SELECT status_codes FROM states )) ",
+    bind => [],
+    test => '-in multi-line subquery test',
+  },
+  {
+    parenthesis_significant => 1,
+    where => {
       customer => { -in => \[
         'SELECT cust_id FROM cust WHERE balance > ?',
         2000,




More information about the Bast-commits mailing list