On Thu, May 22, 2008 at 4:50 PM, Omer Zak <[EMAIL PROTECTED]> wrote: > My environment is Linux Debian Etch, using "Perl 5.8.8 built for > i486-linux-gnu-thread-multi". > I want to install, for a single user, Perl modules which are not already > Debian packages, using cpan. > > I start with clean slate (after rm -rf ~/.cpan), invoke 'cpan' and > configure it, accepting defaults (the chosen mirror is > http://mirror.mirimar.net/cpan/). > > When trying to install modules, I get error messages when trying to > mkdir system directories such as > /usr/local/lib/perl, /usr/local/man/man1, etc. > > Neither '?' inside cpan nor 'perldoc cpan' provided me with answers to > the following question: > > How do I configure cpan to create those directories in user's > home directory (or preferably somewhere inside ~/.cpan), and > then use them when installing stuff? > > I tried also the following, unsuccessfully: > * http://www.perl.com/pub/a/CPAN/misc/cpan-faq.html > * http://perldoc.perl.org/5.8.8/cpan.html > > http://perldoc.perl.org/5.8.8/perlfaq8.html#How-do-I-keep-my-own-module/library-directory%3F > expects me to invoke > 'perl Makefile.PL PREFIX=/mydir/perl LIB=/mydir/perl/lib' > But it seems to require me to run Makefile.PL separately for each module > to be installed, rather than let cpan manage all this automatically. > Also, it does not document any prefix for /usr/local/man/man1. > > So: > Where can I find answer to my question?
You need to configure the CPAN shell to set these variables I have the following in my CPAN shell config file ( /home/gabor/.cpan/CPAN/MyConfig.pm ) 'makepl_arg' => q[PREFIX=~/perl5lib LIB=~/perl5lib/lib], and to support modules that have Build.PL instead of Makefile.PL : mbuildpl_arg' => q[--install_base /home/gabor/perl5lib --install_path lib=/home/gabor/perl5lib/lib], Gabor -- Gabor Szabo http://www.szabgab.com/ Perl Training in Israel http://www.pti.co.il/ Profile: http://www.linkedin.com/in/szabgab _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
