jarthda has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am unable to do something that should be very simple. I am using active state ppm and I want to install a module but its not in any of my active repositories. http://cvs.freebsoft.org/repository/*checkout*/perl-lib/ExtDBH/lib/ExtDBH.pm?rev=1.7 the .pm file is located at the URL above. The help says I can pass a URL which I tried but ppm takes the URL and searches my repositories! Why is it so difficult to install this module? I'm a beginner obviously. the module is ExtDBH and I'm supposed to include the following in my script use DBI; use DBD::Pg; use ExtDBH; help!

Replies are listed 'Best First'.
Re: simple ppm question
by BrowserUk (Patriarch) on Feb 20, 2007 at 19:52 UTC

    PPM installs .ppm files, not .pm files. The former is a binary archive format. The latter, is just a text file.

    To install that particular file, got to the url in your browser, and then use File->SaveAs to save the file to x:\yourperl\site\lib\ExtDBH.pm. And that's it, job done.

    Where x:\yourperl\ is the location of your ActivePerl installation.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      .ppm? You mean .ppd

        Kinda, but not really. A .ppd isn't a binary archive, it's a plain text (XML) file.

        Saying ".ppm" is um... artistic licence. The binary archive files are actually .zip files, but it's no good pointing PPM at any odd .zip you find lying around. You need to point ppm at a .ppd, which must have an associated .zip. All of which is not described anywhere I've seen.

        So, yes and no. :)


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re: simple ppm question
by SheridanCat (Pilgrim) on Feb 20, 2007 at 19:51 UTC
    I was not aware that it's possible to install straight *.pm files with ppm. Normally you'd use ppm to install modules that have been specifically packaged to use that installer.

    However, in this case, you could just put that URL you cite in a browser which will allow you to download the latest ExtDBH.pm module to your hard drive. Just save it to the path where Perl can find it, such as c:\perl\site\lib and you should be okay.

    That said, unless you really need this module, I wouldn't bother. It's a thin abstraction over DBI which doesn't add much. It's only marginally more convenient than straight DBI, in my opinion.

Re: simple ppm question
by syphilis (Archbishop) on Feb 21, 2007 at 07:30 UTC
    I think you could just save that particular file as ExtDBH.pm in your perl/site/lib folder.

    In general, it is not a good idea to install modules in that way (mainly because it often doesn't work) - but it looks to me that it should be ok in this particular instance.

    ExtDBH.pm uses the module 'UserException' which is not to be found on CPAN. If you want ExtDBH.pm to be usable you'll also need to track down UserException and install it as well.

    Cheers,
    Rob