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

Hello Perl Monks,

I had developed my perl script which parses xml documents on Windows operating system with active state perl.

Another team found the script usefull and wants to use it but they live on hp-ux.

When I tried to run my script on hp-ux I found that XML::DOM is not present. I searched cpan and quickly got the module. But the build failed. because none of the dependencies were persent. When I tried to download the dependencies more dependencies came up.

I tried running ppm3 but was greeting with message "sh ppm3 not found"

It was a terrible embarasment, I feel tremendous rage at *unix* for being such a nudist OS. Why don't they have an activestate like distribution? where I all basic modules are installed. and ppm is there?

Please tell me how to get XML::DOM easily.

regards, Sethu

Replies are listed 'Best First'.
Re: perl distribution for hp-ux
by skyknight (Hermit) on Jul 25, 2003 at 16:32 UTC

    What do you mean by "searched CPAN and quickly got the module"? If you're going to the CPAN website, pulling down a tarball, and then trying to install it, you're not being optimally lazy, as you are painfully finding out. What you really ought to do is use the CPAN perl module. From the commnand line, try typing

    perl -MCPAN -e 'install XML::DOM'

    If you haven't done this before, it will prompt you for a bunch of configuration options, one of which is "follow dependencies". You should probably leave it as the default, namely "ask". Then every time you hit a module dependency failure you will be prompted as to whether you want to follow it. If you hit 'y', then it will download and install it, as well as follow its dependencies as well. This is worlds easier than repeatedly experiencing failures and trudging back to cpan.org to download more tarballs manually.

      If the CPAN module is already configured, you can set it to automatically get dependencies by issuing "o conf prerequisites_policy follow" - the default behavior described in the parent would be reset by saying "o conf prerequisites_policy ask". "ask" is better if teh packkage decides that a new version of perl is a preqequisite, (which happens (I think) if a module you are installing or one of it's prereqs is now part of core, implying that your installed version of perl is old.) "follow" is better in most cases with recent distributions (since the preceding case won't happen), since if you have many dependiencies which also have many dependincies, the CPAN modules just does it all automagically.

      Also, it's amusing to hear someone crticize Unix as being naked relative to Windows.

      --Bob Niederman, http://bob-n.com

Re: perl distribution for hp-ux
by dga (Hermit) on Jul 25, 2003 at 16:35 UTC

    ppm is an ActiveState thing.

    Unixes in general have a more compatible environment for programs like perl to compile, so a seperate vendor like ActiveState is not required to get perl up and running on the normal UNIX platform. Thus each vendor has their own package.

    HP-UX is not the only UNIX flavor in existance. Other vendors supply much more 'clothed' perl packages.

    Also note that I think ActiveState is really cool to have made perl available to the windows audience and applaud their efforts. The ppm package is well liked by the folks here who use it to install modules.

      FYI, ActiveState's ActivePerl is also available for Solaris (pkgadd and AS installer) and Linux (RPM, DEB, and AS installer).
Re: perl distribution for hp-ux
by dragonchild (Archbishop) on Jul 25, 2003 at 16:31 UTC
    1. Grab and download every single module you need.
    2. Attempt to install it.
    3. Download every dependency you need.
    4. Repeat from 2.
    Unix isn't a nudist OS. It's an OS that doesn't assume it knows your business better than you do. Granted, that means you actually have to think and work a little. ppm is not something that's installed on HP-UX by default (though, I would assume, you can go find it somewhere).

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: perl distribution for hp-ux
by djbiv (Scribe) on Jul 25, 2003 at 16:33 UTC
    FYI: ppm3 will only exist on 'Active Perl' environemnts. try 'perl -MCPAN -e shell'.
      OK I tried the following command .... but now its asking me my favorite cpan site. when I try http://www.cpan.org it says cannot find MIRRORED.BY.
      What do I enter for this value?
        Please igonre previous post. I found out one ftp server which has this file MIRRORED.BY

        ftp://cpan.digisle.net/pub/CPAN

        When I complete the wizard, it gives the error

        # perl -MCPAN -e 'install XML::DOM' Going to read /tmp/cpan/sources/authors/01mailrc.txt.gz FAILED --decompress --stdout /tmp/cpan/sources/authors/01mailrc.txt.gz: exit status 256 at /opt/perl5/lib/CPAN.pm lin e 449
        What do I do?
Re: perl distribution for hp-ux
by jand (Friar) on Jul 26, 2003 at 02:10 UTC
    Actually HP-UX 11 now ships with ActivePerl (and ppm). It is also available from their website. And it comes with XML::DOM preinstalled.