SQLite(2) and Class::DBI::BaseDSN
[prev]
[thread]
[next]
[Date index for 2005/02/21]
On Sat, Feb 19, 2005 at 06:53:50AM +0000, Simon Wistow said:
> I found that SQLite v. >0.31 was broken with Class::DBI in that it
> produced aforementioned "Use of unitialized value in subroutine entry"
> errors so, for the purposes of clarity I'd suggest using SQLite2 because
> then you won't have problems if (like what happened to me) someone
> upgrades DBD::SQLite on you.
Whilst SQLite2 is supposed to be backwardly compatible with SQLite v <=
0.31 I was having problems with an app and error messages about "can't
locate error messages"
I had a flush of inspiration and checked C:D:BaseDSN and realised that
it was checking for dbi:([^:]+): and using $1 as the Class::DBI driver
which wouldn't work since there was no Class::DBI::SQLite2
The solution I used was copying Class/DBI/SQLite.pm over as SQLite2.pm
and then judiciously inserting 2s in various places.
I could have just stuck a hack which did
$driver = 'SQLite' if $driver eq 'SQLite2';
or the moral equivalent but that felt a bit icky.
Anyway, thought it was worth mentioning and either Class::DBI or BaseDSN
needs fixing.
Simon
|
SQLite(2) and Class::DBI::BaseDSN
Simon Wistow 14:51 on 21 Feb 2005
|