The other day I ran into a bind order bug. Getting a test and patch together was hampered by what appears to be a DBD::SQLite bug---but that's another story.
The patch is simple enough:
=== lib/DBIx/Class/Storage/DBI.pm
==================================================================
--- lib/DBIx/Class/Storage/DBI.pm (revision 1335)
+++ lib/DBIx/Class/Storage/DBI.pm (local)
@@ -913,7 +913,7 @@
my ($self, $op, $extra_bind, $ident, $args) = @_;
my ($sql, @bind) = $self->sql_maker->$op($ident, @$args);
- unshift(@bind,
+ push(@bind,
map { ref $_ eq 'ARRAY' ? $_ : [ '!!dummy', $_ ] } @$extra_bind)
if $extra_bind;
The attached test fails without the patch, succeeds with it, and all
other tests in 0.08/trunk pass with it.
Can it be this simple? Surely there was some reason for unshift instead
of push, but I didn't discover it.
There may be a much better way to test this than the attached
test---suggestions? I'll also need a name for the test before I commit.
-Marc
mjm-bind.t
Description: Troff document
_______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
