EU::MakeMaker shouldn't warn about prereqs in core
authorSteffen Mueller <smueller@cpan.org>
Sun, 18 Apr 2010 14:24:20 +0000 (16:24 +0200)
committerSteffen Mueller <smueller@cpan.org>
Sun, 18 Apr 2010 14:26:12 +0000 (16:26 +0200)
This silences warnings about missing prerequisites when part of a perl
core build. Triggered by #74442.

cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
cpan/ExtUtils-MakeMaker/t/prereq.t

index 4422b68..22ede40 100644 (file)
@@ -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' ;
         }
index cd5d18d..4a537a5 100644 (file)
@@ -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',