[Bast-commits] r5061 - SQL-Abstract/1.x/branches/1.50_RC/lib/SQL

dami at dev.catalyst.perl.org dami at dev.catalyst.perl.org
Thu Nov 6 03:10:46 GMT 2008


Author: dami
Date: 2008-11-06 03:10:46 +0000 (Thu, 06 Nov 2008)
New Revision: 5061

Modified:
   SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm
Log:
DBIx::Class directly calls _recurse_where in scalar context, so we must implement it, even if not in the official API

Modified: SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm
===================================================================
--- SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm	2008-11-06 02:23:31 UTC (rev 5060)
+++ SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract.pm	2008-11-06 03:10:46 UTC (rev 5061)
@@ -326,7 +326,13 @@
 
   # dispatch on appropriate method according to refkind of $where
   my $method = $self->_METHOD_FOR_refkind("_where", $where);
-  $self->$method($where, $logic); 
+
+
+  my ($sql, @bind) =  $self->$method($where, $logic); 
+
+  # DBIx::Class directly calls _recurse_where in scalar context, so 
+  # we must implement it, even if not in the official API
+  return wantarray ? ($sql, @bind) : $sql; 
 }
 
 




More information about the Bast-commits mailing list