Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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.)

Replies are listed 'Best First'.
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 = > "", website => "");

      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://88174]
Approved by root
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2018-05-21 07:47 GMT
Find Nodes?
    Voting Booth?