in reply to How to configure CPAN automatically?

Provide a configuration for CPAN to use :) citrusperl does it citrusperl\vendor\lib\CPAN/Config.pm ... its just a hash

Not sure, but IIRC, Module::AutoInstall does a forced cpan config without prompting (not sure), so see what it does https://metacpan.org/source/BINGOS/Module-Install-1.14/lib/Module/AutoInstall.pm

# last ditch attempt, this -will- configure CPAN, very sorry _load_cpan(1); # force initialize even though it's already loaded

Something https://metacpan.org/pod/CPAN::FirstTime

old stuff (i'd stick to hash)

site:perlmonks.org CPAN.pm autoconfig
CPAN auto-configure
(echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan
scripted cpan configuration
Babysitting an interactive CPAN update (Sep 05)
Automating CPAN Configuration

Replies are listed 'Best First'.
Re^2: How to configure CPAN automatically?
by Anonymous Monk on Mar 17, 2015 at 07:48 UTC
    This ought to do it but it doesn't quite work for me , ignores the first arg, prompts for url list
    require CPAN::FirstTime; CPAN::FirstTime::init( 'GonerConfig.pm', autoconfig => 1 , );