marco.mase...@softeco.it wrote:
Hi André ,
use local::lib:
http://search.cpan.org/~apeiron/local-lib-1.008001/
it nicely handles your issue.
By the way, I tried to use local::lib "out of the box", and could not install
it.
I think it is because the Makefile relies on a GNU make, and the HPUX host I was trying
this on, has another version of make.
That version chokes on the last 2 lines of the Makefile generated by local::lib's
Makefile.pl, and which look like this :
PERL += -Ietc...
FULLPERL += -Ietc....
The error is something like :
missing separator on line 838
missing separator on line 839
(Apologies for not being more precise, but I do not have access to that system
right now)
Not being a great specialist of make (or in fact of anything), I figured that the HPUX
version of make does not like these "+=" operators, but I did not know how to correct
these 2 lines. Of course not being root, I cannot easily install a GNU make on that
system either.
Anyway, in fits and starts, by trying things derived from what I understood of the docs of
local::lib about what local::lib does, I did in the end manage to get CPAN configured in
such a way that it does install perl modules under my own chosen directory, while not root.
The gist of the matter is : if you do not have access to the target system as root *at any
time*, it is quite tricky to get this done.
For example, on another system which I was using to "practice" this first, I could simply
not run "perl -MCPAN ..", because there was a lockfile /root/.cpan/.lock, leftover I
suppose from an aborted root session with CPAN, and when I tried to run CPAN with another
user (to do a "o conf init"), it threw me out each time, because it was still trying to
use the default CPAN parameters (from the /root/.cpan directory), and choking on this
leftover .lock file, which could not be removed of course because it was owned by root.
Fortunately, on that particular system I did have root access, so I could go and remove
that .lock file. Had I been on the real target system, I would have been stuck right there.