Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Local CPAN help

by wrinkles (Pilgrim)
on Sep 14, 2008 at 00:28 UTC ( #711202=perlquestion: print w/replies, xml ) Need Help??
wrinkles has asked for the wisdom of the Perl Monks concerning the following question:

I install my perl modules manually as a non-root user into /opt/local. I've found the following does the job:
perl Build.PL ./Build ./Build test ./Build install --install_base /opt/local
perl Makefile.PL INSTALL_BASE=/opt/local make make test make install
I'd like to use cpan (or cpanplus). What do I need to put in to get the same results when installing from cpan?

Replies are listed 'Best First'.
Re: Local CPAN help
by atcroft (Abbot) on Sep 14, 2008 at 00:50 UTC

    Looking at the section on config variables, it appears maybe the makepl_arg and mbuild_install_arg variables may be the ones you wish to set. (I haven't tried them myself, but those two are described as arguments passed to perl Makefile.PL and ./Build install, respectively.) So likely the following would be used:

    $CPAN::Config = { # ...possibly other options... 'makepl_arg' => q[INSTALL_BASE=/opt/local], 'mbuild_install_arg => q[--install_base /opt/local], # ...possibly other options... }; 1;


    Updated (2008-09-13): changed single-quotes to q regexp quote-like operator (as found in my local CPAN/

      Local, non-root cpan eludes me. I've read through the documentation, tried all the reasonable configurations in, and still run into errors during most cpan installs. Manual installation works for me nearly every time, with the single "install_base" argument.
Re: Local CPAN help
by Anonymous Monk on Sep 14, 2008 at 05:18 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://711202]
Approved by GrandFather
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-03-22 08:53 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (273 votes). Check out past polls.