logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Module::Build] Compat BUG: msg#00009

Subject: Re: [Module::Build] Compat BUG
Ken Williams wrote:

On May 15, 2004, at 5:13 AM, Jaap Karssenberg wrote:


The patch is simple and I first posted it to the mailing list at the
12th of april. The idea is to replace the system() in
M:B:Compat::run_build_pl() with a do(), this way everything takes place
M:in the same process, thus loading the correct nonstandard library
M:path.

This patch fixes the problems for me:
Module/Build/Compat.pm
173c173,175
<   system($^X, $in{script}, @args) == 0 or die "Couldn't run
$in{script}: $!";
---

  local @ARGV = @args;
  do $in{script};
  die if $@;


The only risk is that one might end a Build.PL with 'exit', you could
advise against this in the documentation about subclassing.


I like the spirit of the patch, but when I apply it I get a bunch of failures in the regression tests. I'm not sure why yet.

How about something like (untested):

my @inc_args = map { "-I$_" } @INC;
system($^X, @inc_args, $in{script}, @args) == 0 or die "...";

or the less preferable:

$ENV{PERL5LIB} = join( $Config{path_sep}, @INC );
system($^X, $in{script}, @args) == 0 or die "...";

I think both accomplish the goal if I understand the problem?

Randy.


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click


<Prev in Thread] Current Thread [Next in Thread>