Log in

No account? Create an account

Mon, Feb. 21st, 2005, 12:50 pm

SQLite version <=0.31 is libsqlite v2 as is SQLite2 but SQLite > 0.31 is libsqlite v3.

Still with me?

Me neither.

Actually I get it and I even sort of get the reasons for doing it but it still makes me feel icky. The bad thing is that whilst SQLite2 is supposed to be fully backwards I was getting errors about "can't find object method" and ...

Oh, blinding flash of insight.

... The problem ended up being in Class::DBI::BaseDSN which does a check for dbi:([^:]+): and then uses $1 to initialise the Class::DBI driver. Except there was no Class::DBI::SQLite2.

The solution I used was to copy Class::DBI::SQLite over as Class/DBI/SQlite2.pm and insert 2s judiciously. This may not be the best way although the other quick solution was to do

    $driver = 'SQLite' if $driver eq 'SQLite2'; 

or the moral equivalent which just seems hacky.