Re: [Module-build-general] [BUG] runthrough.t test fails - disttest @INC problem
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-07-18 16:26:09
|
On Friday, July 18, 2003, at 11:08 AM, Ken Williams wrote:
>
> On Friday, July 18, 2003, at 07:13 AM, Steve Purkis wrote:
>
>> Hiya,
>>
>> I figure this may be a known bug, but thought I'd report it anyway.
>> If I run:
>>
>> % perl -Mblib t/runthrough.t
>>
>> it fails - see below for the error. When I checked
>> ACTION_disttest(), I saw the line:
>>
>> # XXX doesn't propagate @INC
>>
>> which looks to me like the problem. Not a show-stopper, but
>> confusing in development.
>
>
> Hi Steve,
>
> This is a semi-known bug. =) Meaning that it's known, but not really
> understood yet.
So, maybe the patch below is all that's required. (Patch is against
current CVS.)
-Ken
Index: lib/Module/Build/Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.144
diff -u -r1.144 Base.pm
--- lib/Module/Build/Base.pm 14 Jul 2003 18:00:29 -0000 1.144
+++ lib/Module/Build/Base.pm 18 Jul 2003 16:24:19 -0000
@@ -1286,7 +1286,8 @@
my $dist_dir = $self->dist_dir;
chdir $dist_dir or die "Cannot chdir to $dist_dir: $!";
# XXX could be different names for scripts
- # XXX doesn't propagate @INC
+
+ local $ENV{'PERL5LIB'} = join $self->{config}{path_sep}, @INC;
$self->run_perl_script('Build.PL') or die "Error executing
'Build.PL' in dist directory: $!";
$self->run_perl_script('Build') or die "Error executing 'Build' in
dist directory: $!";
$self->run_perl_script('Build', [], ['test']) or die "Error
executing 'Build test' in dist directory";
===================================================================
|