How to install quietly? (perl -MCPAN -e shell; install Devel::REPL)

How to install quietly? (perl -MCPAN -e shell; install Devel::REPL)

Post by Peng Y » Fri, 01 Jan 2010 08:54:32


I run
cpan>install Devel::REPL

But it prompt me to answer this question many times. I'm wondering
which option I should config in ~/.cpan/Cpan/MyConfig.pm

==> Auto-install the 1 optional module(s) from CPAN? [y]
 
 
 

How to install quietly? (perl -MCPAN -e shell; install Devel::REPL)

Post by Ben Morro » Fri, 01 Jan 2010 10:09:18


Quoth Peng Yu < XXXX@XXXXX.COM >:

This is due to Module::AutoInstall, which is generally considered
nowadays to have been a Bad Idea. Unfortunately, because of the way
Module::Install works there are likely to be modules using it on CPAN
for some time.

You need to set PERL_AUTOINSTALL=--defaultdeps in your environment. I
don't know if there's any way to put this in CPAN's config. You can also
set it to --alldeps instead to answer 'y' to all the questions (rather
than taking the default answer).

Ben

 
 
 

How to install quietly? (perl -MCPAN -e shell; install Devel::REPL)

Post by Ron Bergi » Fri, 01 Jan 2010 12:45:21


Is this what you're looking for?

perl -MCPAN -e shell
Set up gcc environment - 3.4.5 (mingw-vista special r3)

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.


cpan> o conf prerequisites_policy follow
prerequisites_policy [follow]
Please use 'o conf commit' to make the config permanent!



cpan>

That setting will install all prereq's without prompting.
 
 
 

How to install quietly? (perl -MCPAN -e shell; install Devel::REPL)

Post by Ben Morro » Fri, 01 Jan 2010 23:24:00


Quoth Ron Bergin < XXXX@XXXXX.COM >:


No it won't, not if the prompts are coming from Module::AutoInstall
rather than from CPAN.pm. This is primarily why M::AI is considered a
bad idea now.

Ben