Skip to content

Commit 2e535db

Browse files
committed
Merge check_prereqs and check_PREREQ_FATAL
1 parent e4fca3c commit 2e535db

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
@@ -451,8 +451,7 @@ sub new {
451451
check_manifest();
452452
}
453453
$self->check_min_perl_version;
454-
my $unsatisfied_prereqs = $self->check_prereqs($cmrstash);
455-
$self->check_PREREQ_FATAL($unsatisfied_prereqs); # after ARGV processed
454+
$self->check_prereqs($cmrstash); # must be after ARGV processed
456455
# CONFIGURE after PREREQ_FATAL so can rely on prereqs being present
457456
my ($initial_att, $configure_att) = $self->extract_CONFIGURE;
458457
$self->arch_check(
@@ -467,21 +466,6 @@ sub new {
467466
$self;
468467
}
469468

470-
sub check_PREREQ_FATAL {
471-
my ($self, $unsatisfied_prereqs) = @_;
472-
# RT#91540 PREREQ_FATAL not recognized on command line
473-
if (%$unsatisfied_prereqs && $self->{PREREQ_FATAL}){
474-
my $failedprereqs = join "\n", map {" $_ $unsatisfied_prereqs->{$_}"}
475-
sort { $a cmp $b } keys %$unsatisfied_prereqs;
476-
die <<"END";
477-
MakeMaker FATAL: prerequisites not found.
478-
$failedprereqs
479-
480-
Please install these modules first and rerun 'perl Makefile.PL'.
481-
END
482-
}
483-
}
484-
485469
sub extract_CONFIGURE {
486470
my ($self) = @_;
487471
my %initial_att = %$self; # record initial attributes
@@ -723,7 +707,17 @@ $failedprereqs
723707
Please install these modules first and rerun 'perl Makefile.PL'.
724708
END
725709
}
726-
\%unsatisfied;
710+
# RT#91540 PREREQ_FATAL not recognized on command line
711+
if (%unsatisfied && $self->{PREREQ_FATAL}){
712+
my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
713+
sort { $a cmp $b } keys %unsatisfied;
714+
die <<"END";
715+
MakeMaker FATAL: prerequisites not found.
716+
$failedprereqs
717+
718+
Please install these modules first and rerun 'perl Makefile.PL'.
719+
END
720+
}
727721
}
728722

729723
sub check_min_perl_version {

0 commit comments

Comments
 (0)