Re: Which SQLite DBD To Use

[email protected] (Darren Duncan)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
Will Rutherdale (rutherw) wrote:
>> -----Original Message-----
>> From: Peter J. Holzer [mailto:[email protected]] 
>> On 2010-03-16 17:14:32 -0500, Will Rutherdale (rutherw) wrote:
>>> Is DBD-SQLite the right one to get?
>> Yes.
>>
>> No. The drivers includes an SQLite version and will ignore any other
>> version which may already be installed on the system.
>>
> Interesting.  In embedded systems there is often a lot of fighting over
> flash space, and if people are using SQLite then it has already been
> installed somewhere.
> 
> Is there any way to get the driver to use the existing SQLite and to
> avoid the cost of installing the extra one that comes with DBD-SQLite?

Yes, you can.

Look at the source of the Makefile.PL, 
http://cpansearch.perl.org/src/ADAMK/DBD-SQLite-1.30_01/Makefile.PL , for 
information on how to do that.

The ability to use a system-installed SQLite is present, but disabled by default 
for casual users, because you could be more likely to run into problems due to 
potential version incompatibilities and so forth or other build system complexities.

You enable it by setting the USE_LOCAL_SQLITE and optionally the SQLITE_LOCATION 
environment variables.  Moreover, you have to change the indicated "if(0)" to 
"if(1)" in the Makefile.PL.

-- Darren Duncan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.