[Israel.pm] Installing CPAN in an ~ subdirectory

Offer Kaye offer.kaye at gmail.com
Wed Jun 15 15:11:42 PDT 2005

On 6/13/05, Roman M. Parparov wrote:
> HI,
> I have an account on a machine where perl is installed finally, but I do
> not have write access to Perl tree.
> Thus, I am seeking to configure CPAN so that all the modules it brings
> would be installed in a subdirectory of mine, for instance ~/myperl.
> May I configure ENV/CPAN that way? I haven't found a way so far.

Run the CPAN shell (perl -MCPAN -e shell). When you run it for the
first time it will start a configuration state where it will ask you
questions. In the question that asks optional parameters to
Makefile.PL (e.g. should a PREFIX be used), use your chosen path for
the PREFIX var. If you're curious, the Perl source for the questions
asked can be found here:
The specific question is:
    print qq{

Every Makefile.PL is run by perl in a separate process. Likewise we
run \'make\' and \'make install\' in processes. If you have any
parameters \(e.g. PREFIX, LIB, UNINST or the like\) you want to pass
to the calls, please specify them here.

If you don\'t understand this question, just press ENTER.


There will still be a problem with modules using Build.PL
(Module::Build). I have no suggestion on how to solve this problem (my
solution was to give up and install a local perl on my home dir -
actually a much better solution in the long range :) ).

Offer Kaye

More information about the Perl mailing list