ExtUtils::AutoInstall is a Perl module to automatic install of dependencies via CPAN.
SYNOPSIS
In Makefile.PL, with Module::Install available on the author's system:
use inc::Module::Install;
name ('Joe-Hacker');
abstract ('Perl Interface to Joe Hacker');
author ('Joe Hacker ');
include ('ExtUtils::AutoInstall');
requires ('Module0'); # mandatory modules
features (
-config => {
make_args => '--hello', # option(s) for CPAN::Config
force => 1, # pseudo-option to force install
do_once => 1, # skip previously failed modules
},
'Feature1' => [
'Module2' => '0.1',
],
'Feature2' => [
'Module3' => '1.0',
],
);
auto_install();
&WriteAll;
Invoking the resulting Makefile.PL:
% perl Makefile.PL # interactive behaviour
% perl Makefile.PL --defaultdeps # accept default value on prompts
% perl Makefile.PL --checkdeps # check only, no Makefile produced
% perl Makefile.PL --skipdeps # ignores all dependencies
% perl Makefile.PL --testonly # don't write installation targets
Note that the trailing 'deps' of arguments may be omitted, too.
Using --defaultdeps will make Makefile.PL behave similarly to a regular Makefile.PL file with PREREQ_PM dependencies.
One can use environment variables (see "ENVIRONMENT") below to set a default behavior instead of specifying it in the command line for every invocation of Makefile.PL.
Using make (or nmake):
% make [all|test|install] # install dependencies first
% make checkdeps # same as the --checkdeps above
% make installdeps # install dependencies only
Product's homepage
Requirements:
· Perl