Click here to get back home

cpan shell and MyConfig.pm problem

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
cpan shell and MyConfig.pm problem Ronny 05-07-2008
Posted by Ronny on May 7, 2008, 6:31 am
Please log in for more thread options
I would like to install CPAN modules with the cpan command. Since I
don't have
write permission to the Perl installation directories, I need to do a
local installation.

After playing around with the cpan command a bit and looking at the
source code of
CPAN::Config, I created a $HOME/.cpan/CPAN/MyConfig.pm with the
following content:

$CPAN::Config->="$ENV/.cpan";
$CPAN::Config->=$CPAN::Config->.'/
sources';
$CPAN::Config->=$CPAN::Config->.'/history';
$CPAN::Config->=$CPAN::Config->.'/build';

This works fine for download and test, but install still tries to
write the modules into
the Perl installation directory. In addition, I get during install the
error message

sh: /Perl/cpan-autoconfig: not found

What is broken here?

Ronald

Posted by brian d foy on May 8, 2008, 1:53 pm
Please log in for more thread options
In article

> I would like to install CPAN modules with the cpan command. Since I
> don't have
> write permission to the Perl installation directories, I need to do a
> local installation.

For using the cpan command, configure your CPAN.pm with the right
values in:

make_arg arguments that should always be passed to 'make'
make_install_make_command
the make command for running 'make install', for
example 'sudo make'

make_install_arg same as make_arg for 'make install'
makepl_arg arguments passed to 'perl Makefile.PL'
mbuild_arg arguments passed to './Build'
mbuild_install_arg arguments passed to './Build install'

mbuild_install_build_command
command to use instead of './Build' when we are
in the install stage, for example 'sudo ./Build'

mbuildpl_arg arguments passed to 'perl Build.PL'


For instance, you might set makepl_arg to "PREFIX=~/lib" to install
things in the lib directory inside your home directory.

> After playing around with the cpan command a bit and looking at the
> source code of
> CPAN::Config, I created a $HOME/.cpan/CPAN/MyConfig.pm with the
> following content:

The CPAN::FirstTime module can help you make a configuration file. My
first guess would be that making by hand meant you left out something.

Good luck :)

Posted by Ronny on May 9, 2008, 5:29 am
Please log in for more thread options
> In article
> > I would like to install CPAN modules with the cpan command. Since I
> > don't have
> > write permission to the Perl installation directories, I need to do a
> > local installation.
> The CPAN::FirstTime module can help you make a configuration file. My
> first guess would be that making by hand meant you left out something.

Thanks a lot. So I started again the cpan shell, did

o config init

to run again FirstTime, set the PREFIX variable and now everything
works
as expected!

Ronald

Similar ThreadsPosted
CPAN shell won't work November 8, 2005, 7:55 pm
CPAN shell as plain user November 17, 2004, 7:29 pm
CPAN shell: automatic 'yes' answers? March 3, 2006, 1:21 am
CPAN 'shell' interface stopped working? September 7, 2006, 8:21 am
Stopping the cpan shell from fetching the modules list August 10, 2006, 3:45 am
install Mail::Internet via CPAN shell on Windows (newbie question) May 6, 2005, 5:28 pm
CPAN problem February 24, 2005, 7:08 pm
CPAN problem on sun-sloaris, help me November 17, 2006, 5:35 am
problem upgrading Bundle::CPAN May 25, 2008, 12:21 am
Problem with search.cpan.org grep tool January 29, 2006, 7:02 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap