jason.drew has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks of infinite Perldom

I have a limited knowledge of Perl which is perhaps a dangerous thing. I have installed Perl on my Axim X30 PDA running Windows Mobile 2003 (may the Lords of Perl forgive me for my journey to the dark side of operating systems).

I have the need for the DBI module. I can download this from CPAN but the makefile will not work. Can I copy the relevant files to the relevant directories to get this module to work. If so, how do I find out what files to put where.

Hopefully someone can help

Thanks

Jason

Replies are listed 'Best First'.
Re: Perl, Wince and DBI
by zentara (Cardinal) on Oct 03, 2005 at 09:02 UTC
    When using modules on win32, you should use ppm packages, especially with modules with a C component (like DBI), unless you have a c compiler setup. See A guide to installing modules for Win32

    I'm not really a human, but I play one on earth. flash japh
      Thanks for the quick answers

      Thing is, on Wince I do not even have a command prompt! Oh joy. I think you can get a command prompt download but is the module installation suitable for this platform?

      I am running Apache on the PDA and so far so good.

      Jason

        Is ppm suitable for win32 for handhelds? There are test results for dbi on various operating systems are here but win32 for handhelds isn't mentioned. Maybe if it works for regular windows it works here or maybe not... so just try it. By the way, in terms of getting error messages to post them to perlmonks, you can just copy from the dos window of course, or you might want to try something like

        ppm install http://whatever/whatever.ppm > output.txt 2>&1 output.txt

        to get both the standard output and error output from ppm into a text file. good luck!

Re: Perl, Wince and DBI
by marto (Cardinal) on Oct 03, 2005 at 09:02 UTC
Re: Perl, Wince and DBI
by rvosa (Curate) on Oct 03, 2005 at 09:10 UTC
    Just out of curiosity: will you be running a database on your handheld?
Re: Perl, Wince and DBI
by jZed (Prior) on Oct 03, 2005 at 15:14 UTC
    It's possible, I believe to compile for wince (gotta love that so appropriate name) on a desktop and then move the executable to the PDA but I've never tried so I don't know how easy that is. If you are unable to do that (and I'd pursue that and the other suggestions in this thread first), there is a little goody in the DBI distribution that many people don't know about: DBI::PurePerl. I came up with the idea for that module for exactly your case: it provides many of the features of full DBI without the need to compile. Simply copy your DBI distro lib tree onto the PDA and in your scripts.pm set the environment variable DBI_PUREPERL to 1. With that setting DBI will try to load its compiled executable and if that fails it will load the pure perl version. The pure perl version is slower in some cases and missing some advanced features but has everything you need for standard CRUD operation. It worked for me on wince 3.0 and I've had reports of it working on Zaurus and other PDAs as well.
      Many thanks for that. I'm glad you reminded me as I have come across this but the goldfish side of my memory took over and forgot about it 2 seconds later!

      Actually I have ended up using hash arrays since the database is small and simple but it would be nice to get DBI working anyway for future uses. I will give it a try.

      Jason