From 6f7d0078e68bc6a1f2a59d66e229fb67ce3fbb40 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 2 Jan 2000 20:26:06 +0000 Subject: [PATCH] MakeMaker should attempt to "require" rather than "use" prerequisites to avoid imports (from Michael G Schwern ) p4raw-id: //depot/perl@4748 --- lib/ExtUtils/MakeMaker.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 { -- 2.7.4