15 May 2004 12:13
Re: [Module::Build] Compat BUG
Jaap Karssenberg <j.g.karssenberg <at> student.utwente.nl>
2004-05-15 10:13:21 GMT
2004-05-15 10:13:21 GMT
On Fri, 14 May 2004 17:44:56 -0500 Ken Williams wrote:
: Maybe if you wrote a regression test that fails, I could fix it. I've
:
: fixed every related problem I know about.
A test is fairly complex because it should involve multiple files; the
problem itself is simple though:
In the documentation of Module::Build you say one should use
use lib qw(/nonstandard/library/path);
in Build.PL to include custom modules. Now in Compat.pm you use system()
to run Build.PL, which means that this "use lib" statement is only
executed in a _forked_ process. Later the process executing Makefile.PL
dies because it can't find the custom module.
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}, <at> args) == 0 or die "Couldn't run
$in{script}: $!";
---
> local <at> ARGV = <at> args;
> do $in{script};
(Continue reading)


RSS Feed