From: Michael G. Schwern Date: Thu, 17 Jan 2002 20:12:20 +0000 (-0500) Subject: Re: [PATCH] Re: ndbm failing on linux ? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6626a13ac83996c34a9c1fb4149bac6ad3a7b8d7;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Re: ndbm failing on linux ? Message-ID: <20020118011220.GC32762@blackrider> (#14317 replaced with this) p4raw-id: //depot/perl@14322 --- diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 8daf275..1f414af 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -163,20 +163,9 @@ sub eval_in_subdirs { sub eval_in_x { my($self,$dir) = @_; package main; - chdir $dir or - Carp::carp("Couldn't change to directory $dir: $!"); - - { - local *FH; - open(FH,"Makefile.PL") or - Carp::carp("Couldn't open Makefile.PL in $dir"); - local $/; # Sluuurp. - my $eval = join "", ; - close FH; - # eval, not do, since we need lexical variables - eval $eval; - } + chdir $dir or Carp::carp("Couldn't change to directory $dir: $!"); + eval { do './Makefile.PL' }; if ($@) { # if ($@ =~ /prerequisites/) { # die "MakeMaker WARNING: $@"; @@ -687,11 +676,18 @@ sub check_hints { } continue { last unless $hint =~ s/_[^_]*$//; # nothing to cut off } - return unless -f "hints/$hint.pl"; # really there + my $hint_file = "hints/$hint.pl"; + + return unless -f $hint_file; # really there # execute the hintsfile: - print STDOUT "Processing hints file hints/$hint.pl\n"; - eval { do "hints/$hint.pl" }; + print STDOUT "Processing hints file $hint_file\n"; + { + local *HINT; + open(HINT, $hint_file) || die "Can't open $hint_file: $!"; + eval join '', ; + close HINT; + } print STDOUT $@ if $@; }