Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

How to install CPAN modules?

by goldfish (Novice)
on Jun 13, 2001 at 23:26 UTC ( #88174=perlquestion: print w/ replies, xml ) Need Help??
goldfish has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to write a CGI program that emails something. I want to use MIME::Lite, but I'm not the administrator, the guy hasn't installed it properly and it takes him about three weeks to respond to my continued requests for something that he's forgotten to install. (He's not very friendly.)

I'm at my wit's end and have decided to install it myself, off my home directory (~/.cpan).

I know I can install CPAN modules into other locations and have studied the docs for the CPAN module, but I'm still confused. I'm not sure I understand what I need to do to properly configure CPAN to install things into my directory. Also, how do I tell my script to use my copy of MIME::Lite instead of the broken one? If someone can point me to a FAQ or an "idiot's guide to the CPAN module," I'd be very grateful.

It would also be nice if someone could offer a couple of pointers on how to do this without pissing the administrator off and to make sure I don't fill up all the space on my server. (That'll really piss him off.)

Comment on How to install CPAN modules?
Re: How to install CPAN modules?
by wog (Curate) on Jun 13, 2001 at 23:43 UTC

    The FAQ How do I keep my own module/library directory? is very relevant to your question.

    Basically you pass PREFIX=/the/directory/you/keep/your/modules/in to Makefile.PL (you can make the CPAN module do this by typing o conf makepl_arg PREFIX=... at its prompt (presuming you're using perl -MCPAN -e shell or similar)). And to make your scripts atuomatically use your copy of the module you can put a use lib at the top of your script, or set the PERL5LIB environment variable to tell perl to look at your directory first (see perlrun on that).

Re: How to install CPAN modules?
by mexnix (Pilgrim) on Jun 14, 2001 at 00:12 UTC
    Normally when I have been installing CPAN modules, from tarballs and 'perl -MCPAN -eshell', i've noticed you need root access to run the final 'make install' command. Now if you can set up your modules to install in a dir that you have access to (i.e. ~/lib/perl5) you may be able to get past that, although, I personally have never had that problem. You might be stuck between a rock and a hard place, depending what the admin give you access to...

    __________________________________________________
    %mexnix = (email = > "mexnix@hotmail.com", website => "http://mexnix.perlmonk.org");

      Hi, It seems many have faced same question of UNIX admin not allowing your wanted modules like XML::parser etc. Can any one please help me in installing XML modules in my home directory and using it for the development work? Thanks Saumil

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://88174]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-07-31 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls