From: Gurusamy Sarathy Date: Sun, 2 Jan 2000 20:26:06 +0000 (+0000) Subject: MakeMaker should attempt to "require" rather than "use" prerequisites X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6f7d0078e68bc6a1f2a59d66e229fb67ce3fbb40;p=p5sagit%2Fp5-mst-13.2.git MakeMaker should attempt to "require" rather than "use" prerequisites to avoid imports (from Michael G Schwern ) p4raw-id: //depot/perl@4748 --- diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index f323d27..7afa4f3 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -382,9 +382,13 @@ sub ExtUtils::MakeMaker::new { my($prereq); foreach $prereq (sort keys %{$self->{PREREQ_PM}}) { - my $eval = "use $prereq $self->{PREREQ_PM}->{$prereq}"; + my $eval = "require $prereq"; eval $eval; - if ($@){ + + if ($@) { + warn "Warning: prerequisite $prereq failed to load: $@"; + } + else if ($prereq->VERSION < $self->{PREREQ_PM}->{$prereq} ){ warn "Warning: prerequisite $prereq $self->{PREREQ_PM}->{$prereq} not found"; # Why is/was this 'delete' here? We need PREREQ_PM later to make PPDs. # } else {