Simon Wistow (deflatermouse) wrote,
Simon Wistow


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/ 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.

Tags: dbi driver, flash, icky, insight, sqlite

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.