restructuring Perl installation

D

Damian

Hello again.

I want to restructure my Perl installation (5.6.1) so it's a bit more
self contained.

Right now everything is scattered.

/usr/bin/perl (and all other binaries that come with it.)
/usr/bin/perl5/*
/usr/man/* (scattered perl man's in here.

I want to structure it like
/usr/local/perl5.6.1/bin/ (lke perl and a whole bunch of other binaries
that come with it.)
/usr/local/perl5.6.1/lib/
/usr/local/perl5.6.1/man/

I have recently setup 5.8.2 as well which follows the self
containedsetup like above:

/usr/local/perl5.8.2/bin/
/usr/local/perl5.8.2/lib/
/usr/local/perl5.8.2/man/

now moving files and making symlinks (so perl5.6.1 remains
/usr/bin/perl) is not a problem, my main question comes down to how do I
update the master @INC to reflect the new paths? I read that Config.pm
has to do with it but that alone doesn't seem to do it.

Also, sicne the 5.6.1 bin's are mixed in with everything else in
/usr/bin, whats the best way to seperate them out? Same for the man's.
Maybe by same creation/mod date as /usr/bin/perl, but is that safest
way?

Thanks
 
B

Ben Morrow

Damian said:
I want to restructure my Perl installation (5.6.1) so it's a bit more
self contained.

Right now everything is scattered.

This is usual on Unix systems. It means that if (e.g.) you want a
manpage, you only have to look in one place. Collecting up all the
various files that go together in one piece of software is the job of
a package manager.
/usr/bin/perl (and all other binaries that come with it.)
/usr/bin/perl5/*

What's in here? Or do you mean /usr/lib/perl5?
/usr/man/* (scattered perl man's in here.

I want to structure it like
/usr/local/perl5.6.1/bin/ (lke perl and a whole bunch of other binaries
that come with it.)

You realise you will now have to put /usr/local/perl5.6.1/bin in your
PATH? Also, where do you want libperl.so to go? It *ought* to go in
/usr/lib or /usr/local/lib...
/usr/local/perl5.6.1/lib/
/usr/local/perl5.6.1/man/

I have recently setup 5.8.2 as well which follows the self
containedsetup like above:

/usr/local/perl5.8.2/bin/
/usr/local/perl5.8.2/lib/
/usr/local/perl5.8.2/man/

now moving files and making symlinks (so perl5.6.1 remains
/usr/bin/perl) is not a problem, my main question comes down to how do I
update the master @INC to reflect the new paths? I read that Config.pm
has to do with it but that alone doesn't seem to do it.

Nope. The hardcoded default @INC is, err... hardcoded, so you'll have
to rebuild perl if you want to change it. It's probably best, anyway:
unix programs often get shirty if you try and move them around.
Also, sicne the 5.6.1 bin's are mixed in with everything else in
/usr/bin, whats the best way to seperate them out? Same for the
man's.

The perl mans in man3 will all be called *.3pm, so that's easy. The
others, and the stuff in /bin... tricky. If you do a rebuild into your
new structure you could look in /bin there and remove the old ones
from that.

Ben
 
D

Damian

Ben said:
This is usual on Unix systems. It means that if (e.g.) you want a
manpage, you only have to look in one place. Collecting up all the
various files that go together in one piece of software is the job of
a package manager.


What's in here? Or do you mean /usr/lib/perl5?

oops yes.
You realise you will now have to put /usr/local/perl5.6.1/bin in your
PATH? Also, where do you want libperl.so to go? It *ought* to go in
/usr/lib or /usr/local/lib...


Nope. The hardcoded default @INC is, err... hardcoded, so you'll have
to rebuild perl if you want to change it. It's probably best, anyway:
unix programs often get shirty if you try and move them around.


The perl mans in man3 will all be called *.3pm, so that's easy. The
others, and the stuff in /bin... tricky. If you do a rebuild into your
new structure you could look in /bin there and remove the old ones
from that.

I will have to dig up my linux CD's as 5.6.1 was isntalled as part of
the original rh 7.3 linux installation.

As far as I know theres only rpm's.

Thank you for your help.
 
T

Tassilo v. Parseval

Also sprach Ben Morrow:
This is usual on Unix systems. It means that if (e.g.) you want a
manpage, you only have to look in one place. Collecting up all the
various files that go together in one piece of software is the job of
a package manager.


What's in here? Or do you mean /usr/lib/perl5?


You realise you will now have to put /usr/local/perl5.6.1/bin in your
PATH? Also, where do you want libperl.so to go? It *ought* to go in
/usr/lib or /usr/local/lib...

Provided he has a shared perl library at all. I never build it since I
don't need it (with few exceptions: for using Perl as a scripting engine
for e.g. postgres one needs it).

Tassilo
 
D

Damian

Tassilo v. Parseval said:
Also sprach Ben Morrow:


Provided he has a shared perl library at all. I never build it since I
don't need it (with few exceptions: for using Perl as a scripting engine
for e.g. postgres one needs it).

# whereis libperl.so
libperl:

# locate libperl.so
/home/oracle/OraHome1/Apache/Apache/libexec/libperl.so
/usr/lib/apache/libperl.so

It seems I don't really have a shared perl lib with 5.6.1, just
something apache droppd off (and oracle) I guess, but nothing associated
with 5.6.1 it seems.

I did NOT opt for the shared lib when I recently isntalled 5.8.2 though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top