Skip to content

Commit 7fec702

Browse files
committed
Merge check_prereqs and check_PREREQ_FATAL
1 parent a3a0baa commit 7fec702

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

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

728722
sub check_min_perl_version {

0 commit comments

Comments
 (0)