Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

using CPAN to install in custom location

by ISAI student (Scribe)
on Feb 21, 2011 at 17:29 UTC ( #889429=perlquestion: print w/ replies, xml ) Need Help??
ISAI student has asked for the wisdom of the Perl Monks concerning the following question:

Hello all. I have a need to use Expect module. It is not installed in the company where I work. I have to use:
perl -MCPAN -e 'install Expect'

It only installs where I need root privilages. I do not have them, and for variouso reasons, cannot get the root support for the time being.

Is there a way to use perl -MCPAN and install this module (or any other, for that matter)?

I have tried several searches, and read the documentation, but failed to come up with an answer.

Comment on using CPAN to install in custom location
Download Code
Re: using CPAN to install in custom location
by ciderpunx (Vicar) on Feb 21, 2011 at 17:38 UTC
    Like this? (obviously substitute /home/charlie for your directory of choice)
    perl -MCPAN -e'shell' cpan[1]> o conf mbuildpl_arg "--install_base /home/charlie" mbuildpl_arg [--install_base /home/charlie] Please use 'o conf commit' to make the config permanent! cpan[2]> o conf makepl_arg "PREFIX=/home/charlie" makepl_arg [PREFIX=/home/charlie] Please use 'o conf commit' to make the config permanent! cpan[3]> install Expect


      Yes! That's working great.

      Many many thanks.

      BTW, do you have a quick link to this?

      -Lior

Re: using CPAN to install in custom location
by bingos (Vicar) on Feb 21, 2011 at 23:16 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-08-21 04:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls