On Wed, Nov 12, 2008 at 07:18:12PM +0000, Andy Wardley wrote:
>
>Josh Rosenbaum wrote:
>>My guess is that the execute() routine does not handle an arrayref being 
>>passed
>
>Your guess would be correct.  My bad.

ooooh I found real bug, or misimplemented feature at least. 

>>Possible Solutions:
>
>*) Get Andy to fix it

Cor. thanks Andy, very quick response.

>I've committed a fix to the subversion repository.
>
>http://template-toolkit.org/svnweb/Template-DBI/diff/trunk/lib/Template/Plugin/DBI.pm?rev1=1;rev2=2
>
>You can check out the latest version like so:
>
>  $ svn co svn://svn.tt2.org/tt/Template-DBI/trunk Template-DBI

Ok so I did that and still get the error. :( 

I've had a look at 
/usr/perl5/site_perl/5.8.4/Template/Plugin/DBI.pm

and that's got...

sub execute {
    my $self = shift;
    my @args = @_ == 1 && ref $_[0] eq 'ARRAY' ? @{$_[0]} : @_;
  
    my $sth = $self->{ _STH }->[-1]
        || return $self->_throw('no query prepared');
  
    $sth->execute(@args);
}

Which looks to me like it should cope with the arrayref, so I'm a bit
baffled. I'll have a play further after lunch, and let you know if I
have any sucess.

M
-- 
GPG key here. http://www.gatrell.org/gpg.public.key

Attachment: signature.asc
Description: Digital signature

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to