Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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/MyModule.pm > XML/RSS.pm > HTML/Template.pm > CGI/Session.pm > 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

André

Comment on Installing modules in personal lib directory
Download Code
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.
    chas
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).

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

    Don't fool yourself.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://487609]
Front-paged by ysth
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-08-31 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls