X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMakeMaker.pm;h=a6e56b3ab3968cba1bf621e7f9a36688f8fa7817;hb=8c7f0036c6170bb0e341d84874bdb51f472a6afb;hp=0f46a4fcf86697255ccfbe274e3bb4afc443fba1;hpb=a4260cbc314af5c6712af5fd3e7a7ffb31b9d1c6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 0f46a4f..a6e56b3 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -139,7 +139,7 @@ sub prompt ($;$) { my $ans; local $|=1; print "$mess $dispdef"; - if ($ISA_TTY) { + if ($ISA_TTY && !$ENV{PERL_MM_USE_DEFAULT}) { chomp($ans = ); } else { print "$def\n"; @@ -209,8 +209,9 @@ sub full_setup { PERLRUN PERLRUNINST PERL_ARCHLIB PERL_CORE PERL_LIB PERL_SRC PERM_RW PERM_RWX PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC - PPM_INSTALL_SCRIPT PREFIX PREREQ_FATAL - PREREQ_PM SKIP TEST_LIBS TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG + PPM_INSTALL_SCRIPT PREFIX + PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ + SKIP TEST_LIBS TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG XS_VERSION clean depend dist dynamic_lib linkext macro realclean tool_autosplit MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC @@ -327,6 +328,17 @@ sub ExtUtils::MakeMaker::new { my($class,$self) = @_; my($key); + if ("@ARGV" =~ /\bPREREQ_PRINT\b/) { + require Data::Dumper; + print Data::Dumper->Dump([$self->{PREREQ_PM}], [qw(PREREQ_PM)]); + } + + # PRINT_PREREQ is RedHatism. + if ("@ARGV" =~ /\bPRINT_PREREQ\b/) { + print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " } sort keys %{$self->{PREREQ_PM}}), "\n"; + exit 0; + } + print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose; if (-f "MANIFEST" && ! -f "Makefile"){ check_manifest(); @@ -1781,12 +1793,6 @@ branch from that node into lib/, lib/ARCHNAME or whatever Configure decided at the build time of your perl (unless you override one of them, of course). -=item PREREQ_FATAL - -Bool. If this parameter is true, failing to have the prequired modules -(or the right versions thereof) will be fatal. perl Makefile.PL will die -with the proper message. - =item PREREQ_PM Hashref: Names of modules that need to be available to run this @@ -1794,6 +1800,37 @@ extension (e.g. Fcntl for SDBM_File) are the keys of the hash and the desired version is the value. If the required version number is 0, we only check if any version is installed already. +=item PREREQ_FATAL + +Bool. If this parameter is true, failing to have the required modules +(or the right versions thereof) will be fatal. perl Makefile.PL will die +with the proper message. + +Note: see L for a shortcut for stopping tests early if +you are missing dependencies. + +Do I use this parameter for simple requirements, which could be resolved +at a later time, e.g. after an unsuccessful B of your module. + +It is I rare to have to use C at all! + +=item PREREQ_PRINT + +Bool. If this parameter is true, the prerequisites will be printed to +stdout and MakeMaker will exit. The output format is + +$PREREQ_PM = { + 'A::B' => Vers1, + 'C::D' => Vers2, + ... + }; + +=item PRINT_PREREQ + +RedHatism for C. The output format is different, though: + + perl(A::B)>=Vers1 perl(C::D)>=Vers2 ... + =item SKIP Arrayref. E.g. [qw(name1 name2)] skip (do not write) sections of the @@ -2139,6 +2176,11 @@ Command line options used by Cnew()>, and thus by C. The string is split on whitespace, and the result is processed before any actual command line arguments are processed. +=item PERL_MM_USE_DEFAULT + +If set to a true value then MakeMaker's prompt function will +always return the default without waiting for user input. + =back =head1 SEE ALSO