in reply to automate Net::SSH::Perl install via CPAN

Choosing the default is easy. Set the PERL_MM_USE_DEFAULT environment variable or connect /dev/null to stdin. I have only done this when running 'perl Makefile.PL' manually but it should be possible to automate CPAN:
perl -MCPAN -e 'install Net::SSH::Perl' < /dev /null

It may be possible to create a file with the selections and pipe this to Makefile.PL. This relies on the prompts coming in the same order.

Replies are listed 'Best First'.
Re: Re: automate Net::SSH::Perl install via CPAN
by perlknight (Pilgrim) on Nov 05, 2003 at 19:36 UTC
    I have not done that, But I was thinking of using this code snippet from README on CPAN,
    #!/usr/bin/perl use CPAN; for $mod (qw(MD5 Net::SSH::Perl)){ my $obj = CPAN::Shell->expand('Module',$mod); $obj->install; }
    But I was wondering if I could automate it by passing Makefile.PL the arguments like so
    $obj->makepl_arg = "arg1 arg2 arg3 ..."; $obj->install;
    Have any one try this? Thanks.