In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/9d6c7f2eccef26a6d6eb46a8192949a88c6aaf8f?hp=83d5895a155b275741e82edebaa0001c30f04f4d>

- Log -----------------------------------------------------------------
commit 9d6c7f2eccef26a6d6eb46a8192949a88c6aaf8f
Author: Max Maischein <[email protected]>
Date:   Thu Sep 24 21:18:07 2009 +0100

    Make makedef.pl more robust
-----------------------------------------------------------------------

Summary of changes:
 makedef.pl |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/makedef.pl b/makedef.pl
index 1b3c2b5..65c2e28 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -34,6 +34,7 @@
 
 
 BEGIN { unshift @INC, "lib" }
+use Config;
 use strict;
 
 use vars qw($PLATFORM $CCTYPE $FILETYPE $CONFIG_ARGS $ARCHNAME $PATCHLEVEL);
@@ -75,7 +76,13 @@ if ($PLATFORM eq 'win32' or $PLATFORM eq 'wince' or 
$PLATFORM eq "aix") {
        # the user might have chosen to disable because the canned configs are
        # minimal configs that don't include any of those options.
        my $opts = ($PLATFORM eq 'wince' ? '-MCross' : ''); # for wince need 
Cross.pm to get Config.pm
-       my $config = `$^X $opts -Ilib -V`;
+
+       $ENV{PERL5LIB} = join $Config{path_sep}, @INC;
+       my $cmd = "$^X $opts -V";
+       my $config = `$cmd`;
+       if (! $config) {
+           die "Couldn't run [$cmd]: $!";
+        };
        my($options) = $config =~ /^  Compile-time options: (.*?)\n^  \S/ms;
        $options =~ s/\s+/ /g;
        print STDERR "Options: ($options)\n";

--
Perl5 Master Repository

Reply via email to