As for suppressing prompts, properly-coded versions of Makefile.PL and Build.PL should not prompt (and take the default) if environment variable PERL_MM_USE_DEFAULT is set to a true value. This is documented in the ExtUtils::MakeMaker and Module::Build::API documentation, respectively.
The situation on tests that prompt is more confusing. The Oslo Consensus says to set environment variable AUTOMATED_TESTING where there is no recourse to a human operator. One of my first modules (before the Oslo Consensus' date of 2008) drew as its first RT ticket a complaint that I should respond to this environment variable, so I suspect that CPAN modules will generally respond to it. The Lancaster Consensus talks about setting NONINTERACTIVE_TESTING, but I do not know how wide-spread this is.
Of course, none of this works with ill-behaved installations. A first cut might be to re-open STDIN on the null device -- but of course if the installation is ill-behaved, who knows what that will do?
For specific modules, it is also possible that their Makefile.PL or Build.PL files will respond to command-line options if these are specified. The CPAN client provides a mechanism for configuring individual distributions, which I believe can provide arguments to Makefile.PL or Build.PL. See 'Distroprefs' in the 'CPAN' documentation (NOT 'cpan', which may be a problem if you have a case-blind file system). I can't speak to CPANP or cpanm
In reply to Re: Programmatically installing modules
by Anonymous Monk
in thread Programmatically installing modules
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |