Re: [Module-build-general] bug in Module-Build-0.18
Status: Beta
Brought to you by:
kwilliams
|
From: jk <bil...@fa...> - 2003-05-16 02:39:40
|
Ken Williams wrote:
>
> On Thursday, May 15, 2003, at 05:00 PM, jk wrote:
>
>> Ken Williams wrote:
>>
>>>
>>> Hmm, that's strange. Perhaps you set PERL5LIB after you ran 'perl
>>> Build.PL'? 'perl Build.PL' freezes @INC so that it'll be the same
>>> for all subsequent runnings of the 'Build' script.
>>
>>
>>
>> I don't think so, the PERL5LIB is set in my .bash_profile
>
>
> Hmmm - care to try another patch? I think maybe it's the way I'm
> overwriting $ENV{PERL5LIB} in the tests. Patch below.
Sorry for my ignorance, but I don't know how to a patch, I have never
done that before... if you can explain I'll be happy to try if it might
help.
JK
>
> Index: t/basic.t
> ===================================================================
> RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v
> retrieving revision 1.12
> diff -u -r1.12 basic.t
> --- t/basic.t 12 Apr 2003 03:36:42 -0000 1.12
> +++ t/basic.t 15 May 2003 22:16:00 -0000
> @@ -14,7 +14,11 @@
> ok $INC{'Module/Build.pm'}, '/blib/', "Make sure Module::Build was
> loaded from blib/";
>
> # So 'test' and 'disttest' in Sample/ can see the not-yet-installed
> Module::Build.
> -unshift @INC, $ENV{PERL5LIB} = File::Spec->catdir(
> Module::Build->cwd, 'blib', 'lib' );
> +{
> + my $build_dir = File::Spec->catdir( Module::Build->cwd, 'blib',
> 'lib' );
> + unshift @INC, $build_dir;
> + $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
> $build_dir;
> +}
>
> chdir 't';
>
> Index: t/runthrough.t
> ===================================================================
> RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v
> retrieving revision 1.21
> diff -u -r1.21 runthrough.t
> --- t/runthrough.t 15 May 2003 21:29:22 -0000 1.21
> +++ t/runthrough.t 15 May 2003 22:16:00 -0000
> @@ -17,9 +17,12 @@
> my $start_dir = Module::Build->cwd;
>
> # So 'test' and 'disttest' can see the not-yet-installed Module::Build.
> -unshift @INC, # For 'test'
> -$ENV{PERL5LIB} = # For 'disttest'
> -File::Spec->catdir( $start_dir, 'blib', 'lib' );
> +{
> + my $build_dir = File::Spec->catdir( $start_dir, 'blib', 'lib' );
> + unshift @INC, $build_dir;
> + $ENV{PERL5LIB} = $ENV{PERL5LIB} ? "$build_dir:$ENV{PERL5LIB}" :
> $build_dir;
> +}
> +warn "PERL5LIB is $ENV{PERL5LIB}\n";
>
> my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' );
> chdir $goto or die "can't chdir to $goto: $!";
> ===================================================================
>
> -Ken
>
>
|