Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Installing modules in personal lib directory

by Andre_br (Pilgrim)
on Aug 30, 2005 at 00:04 UTC ( #487609=perlquestion: print w/replies, xml ) Need Help??
Andre_br has asked for the wisdom of the Perl Monks concerning the following question:

Hello my esteemed code-friends,

I am in need of some modules my host staff says it would be better if I install them in a personal lib directory, like this:

> 1. pick a location for your personally installed and created perl mo +dules > such as /home/username/perl > 2. build a module tree such as > /home/username/perl/ > Greg/ > XML/ > HTML/ > CGI/ > then in your code add a new path to @INC using the line: > use lib "/home/username/perl";
Isn´t this a dirty installation? I mean, just copying the .pm files to their tree? Here, at development, I always install modules through the PPM3 shell. Can I do that in this case too? How to specify to PPM3 that the specific target isn´t my host's central module repository?

Thanks a lot


Replies are listed 'Best First'.
Re: Installing modules in personal lib directory
by Joost (Canon) on Aug 30, 2005 at 00:20 UTC
      Sorry, I made a mess: ppm3 is for win's Active Perl, and my host is Linux. Forget about the ppm3 installation.

      Maybe using CPAN module, but I´m not sure on how to set the installation path to my personal lib directory...

      As for the procedure you mentioned, Joost, please give me more details.

Re: Installing modules in personal lib directory
by jimX11 (Friar) on Aug 30, 2005 at 00:52 UTC

    Maybe I don't understand your question, but it seems that you just need some experience install modules using CPAN.

    In this node I found a link to a CPAN faq.

Re: Installing modules in personal lib directory
by chas (Priest) on Aug 30, 2005 at 01:38 UTC
    If the module doesn't have other dependencies, I have usually just downloaded it and then used
    perl Makefile.PL LIB=/home/myusername/somedirectory PREFIX=/home/myusername/somedirectory
    and that has always worked well. Things seemed to work better when I set both PREFIX and LIB. (I spent some time trying to figure out if both were really necessary and what the difference is; I think I was never absolutely certain...even though I did read the docs.) Using the CPAN module seems to be a recommended way, but I often had a lot of trouble with that.
Re: Installing modules in personal lib directory
by polettix (Vicar) on Aug 30, 2005 at 10:24 UTC
    Probably overkill for your case, but you could take a glance to PAR (see brief definition).

    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://487609]
Front-paged by ysth
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-08-23 04:13 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (345 votes). Check out past polls.