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.

Replies are listed 'Best First'.
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