Skip to content

Commit d9d5c90

Browse files
committed
Merge check_prereqs and check_PREREQ_FATAL
1 parent c7dd221 commit d9d5c90

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

lib/ExtUtils/MakeMaker.pm

+12-18
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,7 @@ sub new {
438438
check_manifest();
439439
}
440440
$self->check_min_perl_version;
441-
my $unsatisfied_prereqs = $self->check_prereqs($cmrstash);
442-
$self->check_PREREQ_FATAL($unsatisfied_prereqs); # after ARGV processed
441+
$self->check_prereqs($cmrstash); # must be after ARGV processed
443442
# CONFIGURE after PREREQ_FATAL so can rely on prereqs being present
444443
my ($initial_att, $configure_att) = $self->extract_CONFIGURE;
445444
$self->arch_check(
@@ -454,21 +453,6 @@ sub new {
454453
$self;
455454
}
456455

457-
sub check_PREREQ_FATAL {
458-
my ($self, $unsatisfied_prereqs) = @_;
459-
# RT#91540 PREREQ_FATAL not recognized on command line
460-
if (%$unsatisfied_prereqs && $self->{PREREQ_FATAL}){
461-
my $failedprereqs = join "\n", map {" $_ $unsatisfied_prereqs->{$_}"}
462-
sort { $a cmp $b } keys %$unsatisfied_prereqs;
463-
die <<"END";
464-
MakeMaker FATAL: prerequisites not found.
465-
$failedprereqs
466-
467-
Please install these modules first and rerun 'perl Makefile.PL'.
468-
END
469-
}
470-
}
471-
472456
sub extract_CONFIGURE {
473457
my ($self) = @_;
474458
my %initial_att = %$self; # record initial attributes
@@ -710,7 +694,17 @@ $failedprereqs
710694
Please install these modules first and rerun 'perl Makefile.PL'.
711695
END
712696
}
713-
\%unsatisfied;
697+
# RT#91540 PREREQ_FATAL not recognized on command line
698+
if (%unsatisfied && $self->{PREREQ_FATAL}){
699+
my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
700+
sort { $a cmp $b } keys %unsatisfied;
701+
die <<"END";
702+
MakeMaker FATAL: prerequisites not found.
703+
$failedprereqs
704+
705+
Please install these modules first and rerun 'perl Makefile.PL'.
706+
END
707+
}
714708
}
715709

716710
sub check_min_perl_version {

0 commit comments

Comments
 (0)