views:

64

answers:

2

I need to set up sqllite for Perl on a Windows box. However - Perl is probably being run over the network from a central server, and I do not know what modules will be available on initial running of my script.

I can guarantee Perl 5.8+ (activestate) or Perl 5.10+ (strawberry).

Therefore, I need to package sqlite & the associated Perl module(s) in the project directory itself. Having Goggled around, I don't see any immediate zipfile to do this.

+2  A: 

The DBD::SQlite distribution should have everything you need for SQLite. It comes with the Perl interface and all the SQLite stuff you need. You'll also need the basic DBI package too.

However, I encourage you to set up whatever application you have to install as a Perl distribution with dependencies, etc. Then you just install your application as a Perl module with the normal Perl tools. You specify whatever you need in the tool configuration at installation time. That way you aren't creating some new system that you have to explain to other Perl programmers, create new tools for, or maintain in some odd way.

You can even set up your own internal mini-CPAN with just the modules you need so you can control it within your network. See, for instance, my DPAN stuff.

brian d foy
I downloaded the distribution but it didn't look to have drop-in usability for Windows, it had a pile of C files and required compilation. Integration for this particular application is non-trivial - I am interfacing into another Perl system which is determining my requirements for packaging. I will have to bundle sqllite with the distribution of my program in some fashion.
Paul Nathan
Well, Strawberry Perl comes with a compiler. As for "have to", well, I think you've already decided that's a solution, so good luck with that.
brian d foy
@Paul, are you using ActivePerl for your windows Perl distro? If so, you can install precompiled binary versions of many modules through PPM. I recommend picking one package manager (CPAN shell or PPM) and sticking with it for all your installs. ActiveState's PPM repo should have DBD::SQLite. If not, look at [Kobesearch](http://cpan.uwinnipeg.ca/module/DBD::SQLite) to find links to download PPMs. You can use [PPM-Make](http://cpan.uwinnipeg.ca/dist/PPM-Make) to package standard module dists as PPMs, so you can manage ALL your modules through PPM.
daotoad
@Paul, or you could use Strawberry Perl and use normal Perl tools and just compile your modules normally.
daotoad
+1  A: 

DBD::SQLite is included into Strawberry (any version) and ActivePerl (AFAIK starting from 5.8.8 build 820). For other modules you can use PAR::Packer to package into .exe.

Alexandr Ciornii
Due to legacy issues, I was running off of 5.6; this didn't have DBD::SQLite, and installing it was being a pain. Switching my run path to 5.8 solved the problem.
Paul Nathan