Skip Menu |

This queue is for tickets about the Data-Phrasebook CPAN distribution.

Report information
The Basics
Id: 11952
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Data-Phrasebook

People
Owner: BARBIE [...] cpan.org
Requestors: oliver.gorwits [...] computing-services.oxford.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SQL::Query doesn't prepare() or execute() (but should?)
Hello barbie, It took me just a little while to realise that although Data::Phrasebook::SQL::Query (0.20) was originally coded to call prepare() and execute() on its DB statement handles before fetch*(), this feature has been disabled with the following comment: # Currently the following is not true, but will be fixed at some point: # #Any C<fetch*> methods will additionally call C<execute> #unless the statement handle is already active. It should be happening in the AUTOLOAD, but a tiernary operator has been 'fixed' to avoid the additional calls. I would be grateful if you could tell me why this is the case - I'm no DBI expert but reenabling the feature seemed to cause no problems to my system. Many thanks in advance, regards, oliver.
Show quoted text
> I would be grateful if you could tell me why this is the case - I'm no > DBI expert but reenabling the feature seemed to cause no problems > to my system.
Unfortunately the $sth->{Active} value was not always getting set during my tests. As such execute() was getting called twice and causing some problems. This may have been a problem with my set up, but haven't had the chance to look deeper into this yet. It is on my task list though, so hopefully I'll get to it in the next few weeks. Barbie.