summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2010-04-18 16:24:20 +0200
committerSteffen Mueller <smueller@cpan.org>2010-04-18 16:26:12 +0200
commit175046355f077016734ad8701ddd6ecb790a1591 (patch)
treecdbd56f5c26f318c12681bcfd5169fe52c985970 /cpan
parent460fdedb7c436afaa24f04e2b7b35efbf4418573 (diff)
downloadperl-175046355f077016734ad8701ddd6ecb790a1591.tar.gz
EU::MakeMaker shouldn't warn about prereqs in core
This silences warnings about missing prerequisites when part of a perl core build. Triggered by #74442.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm6
-rw-r--r--cpan/ExtUtils-MakeMaker/t/prereq.t3
2 files changed, 7 insertions, 2 deletions
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
index 4422b686ce..22ede4050c 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
@@ -467,14 +467,16 @@ END
if (!$installed_file) {
warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $required_version
- unless $self->{PREREQ_FATAL};
+ unless $self->{PREREQ_FATAL}
+ or $ENV{PERL_CORE};
$unsatisfied{$prereq} = 'not installed';
}
elsif ($pr_version < $required_version ){
warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
$prereq, $required_version, ($pr_version || 'unknown version')
- unless $self->{PREREQ_FATAL};
+ unless $self->{PREREQ_FATAL}
+ or $ENV{PERL_CORE};
$unsatisfied{$prereq} = $required_version ? $required_version : 'unknown version' ;
}
diff --git a/cpan/ExtUtils-MakeMaker/t/prereq.t b/cpan/ExtUtils-MakeMaker/t/prereq.t
index cd5d18d781..4a537a5206 100644
--- a/cpan/ExtUtils-MakeMaker/t/prereq.t
+++ b/cpan/ExtUtils-MakeMaker/t/prereq.t
@@ -35,6 +35,9 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
local $SIG{__WARN__} = sub {
$warnings .= join '', @_;
};
+ # prerequisite warnings are disbled while building the perl core:
+ local %ENV;
+ delete $ENV{PERL_CORE};
WriteMakefile(
NAME => 'Big::Dummy',