X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=3c4187339c521650717e2371b82af37d70e0fbf7;hb=b57052ce0ae3e37469a3d872aaebb2f16730355b;hp=6532653ce585aa1db86ca5602e38039e3113b1bf;hpb=4860d3d289a117feac8166f0c9e8d4e98fc0273b;p=p5sagit%2Flocal-lib.git diff --git a/Makefile.PL b/Makefile.PL index 6532653..3c41873 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -18,12 +18,22 @@ BEGIN { push(@ARGV,$ENV{PERL_MM_OPT}); system($^X, '-MExtUtils::MakeMaker 6.31', '-e1'); - my $r = $? >> 8; + my $eumm = $? >> 8; + + system($^X, '-MCPAN 1.80', '-e1'); + my $cpan = $? >> 8; + my $cpan_command = ''; # XXX - remove the force on EUMM once its test suite survive PERL_MM_OPT - if ($r) { # non-zero exit - system($^X, '-MCPAN', '-e', 'force("install","ExtUtils::MakeMaker");'); + if ($eumm) { # non-zero exit + $cpan_command .= 'force("install","ExtUtils::MakeMaker"); '; + } + if ($cpan) { + $cpan_command .= 'install("CPAN"); '; + } + if(length $cpan_command) { + system($^X, '-MCPAN', '-e', $cpan_command); } } @@ -34,12 +44,6 @@ use inc::Module::Install; name 'local-lib'; all_from 'lib/local/lib.pm'; -include('CPAN'); -include('CPAN::HandleConfig'); -include('CPAN::Debug'); -include('CPAN::Version'); -include('CPAN::Tarzip'); - requires 'ExtUtils::MakeMaker' => '6.31'; # version INSTALL_BASE was added requires 'ExtUtils::CBuilder'; # this and ParseXS are needed for MB C_support requires 'ExtUtils::ParseXS';