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

Dear Monks,

I have a difficult sys admin. One that will not allow me to
install (via make install) CPAN perl modules in the default localation.
How can I change or append to the "default location" for my
Perl modules. libwww-perl-5.69 and all of the modules it requires
are the modules I need to install.

Tanks

Replies are listed 'Best First'.
Re: alternate install directory?
by crenz (Priest) on Mar 11, 2003 at 20:11 UTC

    You can install perl modules in a custom location by using

    perl Makefile.pl PREFIX=/home/LameNerd
    make
    make test
    make install

    I use it all the time on my account at pair.com.

Re: alternate install directory?
by LameNerd (Hermit) on Mar 11, 2003 at 20:31 UTC
    Thanks Abbot crenz,
    Will I have to do anything in my Perl scripts
    when I "use" modules installed this way?
    For example I install URI.pm this way and when I
    attempt to build libwww-perl like so ...
    $ perl Makefile.PL PREFIX=/home/LameNerd .... $ make .... $ make test .... local/protosub........Can't locate URI.pm in @INC (@INC contains: ../b +l ....
    What should I do to correct the make test problem?
    update I was able to get libwww-perl to install by doing this ...
    $ PERL5LIB=/home/LameNerd/PERL_MODS_INSTALL:/home/LameNerd/PERL_MODS_I +NSTALL/lib/perl5/site_perl/5.8.0 $ export PERL5LIB $ perl Makefile.PL PREFIX=/home/LameNerd .... $ make .... $ make test .... ok 100%! $ make install ...
      Add a use lib '/home/LameNerd/';to the test scripts above the use URI.pm or make sure @INC includes the path to the URI.pm.
      HTH
      'Fect