diff options
author | Michael G. Schwern <schwern@pobox.com> | 2002-01-17 15:12:20 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-18 00:21:11 +0000 |
commit | 6626a13ac83996c34a9c1fb4149bac6ad3a7b8d7 (patch) | |
tree | b4eee645dfce5e53f21820105d831cb5fd059109 /lib | |
parent | 04a80ee019fadd81ac4e1a8bd503bcb51ff95810 (diff) | |
download | perl-6626a13ac83996c34a9c1fb4149bac6ad3a7b8d7.tar.gz |
Re: [PATCH] Re: ndbm failing on linux ?
Message-ID: <20020118011220.GC32762@blackrider>
(#14317 replaced with this)
p4raw-id: //depot/perl@14322
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 8daf27595e..1f414afcfb 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 "", <FH>; - 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 '', <HINT>; + close HINT; + } print STDOUT $@ if $@; } |