Operating System - HP-UX
1834877 Members
2429 Online
110070 Solutions
New Discussion

Perl configuration and modules on HP-UX 11i

 
SOLVED
Go to solution
Robert Milne
Frequent Advisor

Perl configuration and modules on HP-UX 11i

Hi all,

I am just doing some scripting in Perl, and while it works OK, I now have a need to load some CPAN modules and am wondering where the libs are and indeed am wondering is Perl setup correctly !?

Perl (the binary), by default on system install is loaded at /usr/contrib/bin but I can't find any other associated files with it here, or anywhere. The Perl binary is the perl thing loaded, no mans, no docs nothing. Also it is v5.005_02 mind you the older version is not stopping me from doing anything.

I have some CPAN modules I wish to load and use eg. I want to do "use Date::Parse;" in my code. Normally I would just put these modules at .../perl/lib/date or something similar. Should I just create a perl/lib directory and just put it in the path, or some environment variable, or put it at /usr/contrib/lib or what ?

What is the best way to use and configure Perl on HP-UX 11i and what is a recommended version, should I bother updating ? I'm not doing anything special, no CGI, Apache mod-perl or anything like that. Just hacking some shell type scripts to make life easier.

Any advice taken !

All the best.

Rob.
"For every pleasure there's a tax."
7 REPLIES 7
Michael Tully
Honored Contributor

Re: Perl configuration and modules on HP-UX 11i

Hi Rob,

You want to invest some time downloading a later version.
You can 5.6.1 from here for free in 'swinstall' format.
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=PERL

or an even later version from here:
http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.0/

They will contain some extras other than the single binary.

Here is a useful link as well.
https://www.beepz.com/personal/merijn/

HTH
Michael
Anyone for a Mutiny ?
H.Merijn Brand (procura
Honored Contributor

Re: Perl configuration and modules on HP-UX 11i

Date::Parse is a pure perl module, which means that you do not need a C compiler to install this module. If you however decide to add more complex modules that require a compiler later on, be sure to in stall a perl that is build with a compiler that you can use too. Choosing a 64bit threaded perl built with gcc-3.2 will proove you to be a PITA on 11i (at the moment) because getting that combo running smoothly with e.g. Oracle is almost undoable.

If you have HP C-ANSI-C available, consider rebuilding perl (preferably 5.8.0) yourself from the source tree, because it is 25 % faster than gcc builds, and adding modules will proove a breathe (simple)

All public available perl's (as I've seen them around) are build with gcc.

Until not so long ago, HP shipped perl-5.6.1 on the application CD's and these are installed on /opt/perl, the porting center has however recently decided to use /usr/local as installation path. Take care.

My site (the beepz https that Michael mentioned) has ports for a rich featured 32bit perl port build on HP-UX 11.00 with gcc-3.2 prepared for Oracle and it comes with a useful list of precompiled modules, amongst them Date::Manip and Date::Calc
Enjoy, Have FUN! H.Merijn
Robert Milne
Frequent Advisor

Re: Perl configuration and modules on HP-UX 11i

Hi,

As mentioned by Michael, I went to the link he suggested for the v5.6.1 variant as is in depot swinstall format, I thought would be easy. Downloaded the HP-UX 11.0/11i variant for PA-RISC OK into the /var/tmp directory as the instructions sugggest. I renamed/mv'd it to perl_11.11.depot as the downloaded name was an awful thing to type !

Doing a swlist -d @ /tmp/perl_11.11.depot it returns:
"# Initializing...
# Contacting target "robshp"...
#
# Target: robshp:/tmp/perl_11.11.depot
#

#
# Bundle(s):
#

perl B.5.6.1.E Perl Programming Language".

correctly.

However I was not as lucky with the install. Following the instructions provided I then did a:
# swinstall -s /tmp/perl_11.11.depot perl

With the following result:

======= 11/05/02 16:41:03 EDT BEGIN swinstall SESSION
(non-interactive)

* Session started for user "root@robshp".

* Beginning Selection
* Target connection succeeded for "robshp:/".
* "robshp:/tmp/perl_11.11.depot": This source is a tape device.
* "robshp:/tmp/perl_11.11.depot": Cannot open the logfile on
this target or source. Possibly the media is read-only or
there is a permission problem. Check the daemon logfile and
"/var/tmp/swagent.log" on this host for more information.
ERROR: Could not apply the software selection "perl" because it
refers to a bundle or to a product, subproduct or fileset
within a bundle but no compatible bundles meeting the
specification were found.
* Software selection failed for "robshp:/tmp/perl_11.11.depot".
ERROR: No software has been selected.
ERROR: Cannot continue the "swinstall" task.
* Selection had errors.



======= 11/05/02 16:41:08 EDT END swinstall SESSION (non-interactive)

As you can see I was logged in as root so shouldn't have had a permissions problem.

The /var/tmp/swagent.log logfile as suggested only shows:
* 11/05/02 16:41:06 EDT BEGIN source AGENT SESSION (pid=1910)
* Agent session started for user "root@robshp". (pid=1910)
* 11/05/02 16:41:08 EDT END source AGENT SESSION (pid=1910)

So I think not much help here...

I am not sure what has gone wrong here, but then I am not a swinstall expert. By the way this is install is on our test HP-UX 11.0 workstation, not the live 11.11 box ultimately this is destined for. But I figure I need to get it working on our test box first so I can test my Perl scripts there as well.

Regards,

Rob.

PS Thanks a heap guys, you are incredibly useful, there is no forum/list better than this, and I am not just sucking...
"For every pleasure there's a tax."
Michael Tully
Honored Contributor
Solution

Re: Perl configuration and modules on HP-UX 11i

Hi Robert,

Try one of these:

# swinstall -s /tmp/perl_11.11.depot \*
or
# swinstall -x match_target=true -s /tmp/perl_11.11.depot

or even just 'swinstall' from the command line will start the interactive session. This is menu driven and you can take control over the whole install.

HTH
Michael

Anyone for a Mutiny ?
Robert Milne
Frequent Advisor

Re: Perl configuration and modules on HP-UX 11i

Hi Michael,

I had no luck with any of those swinstall options, basically the same problem. I am not sure if that 5.6 version was the wrong "depot type" if there is such a thing.

Anyway suspecting there was something wrong with it I went to the 5.8.0 version you originally suggested at the UK site. Copied that down, ran the swinstall command line variant, and hey presto, in it went with no dramas ! And I guess I've also got the later version to boot. I renamed the old v4.0 version in /usr/contrib/lib to something else, and put the /usr/local/bin into my path, do a perl -v and I get "This is perl, v5.8.0 built for PA-RISC2.0" so all looks fine. I've also got the man perl pages, perldoc and pod files so everything looks cool; I hope...

Thanks for your help here, I think I've got it !

Regards,

Rob.
"For every pleasure there's a tax."
H.Merijn Brand (procura
Honored Contributor

Re: Perl configuration and modules on HP-UX 11i

Do not rename the /usr/contrib/bin version! It might still be used by HP's configuration and sw install utilities. Just be sure that /usr/local/bin is in front of /usr/contrib/bin in your $PATH (don't forget to change /etc/PATH too)
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: Perl configuration and modules on HP-UX 11i

Don't rename perl on /usr/contrib/bin. Some HP installation procedures might still need it. Instead edit your .profile and /etc/PATH to be sure that /usr/local/bin is before (in front of) /usr/contrib/bin
Enjoy, Have FUN! H.Merijn