Subject: Re: [PATCH] test-lib.sh: set PERL5LIB instead of GITPERLLIB

From: Lea Wiemann <[email-masked]>
Date: Mon, 02 Jun 2008 16:08:34 +0200

Junio C Hamano wrote:
> the primary Makefile has this rule to munge our perl scripts:
> 
>                     -e '	s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
> 
> The real fix to the issue [is] to fix the build procedure of
> gitweb/gitweb.perl so that the above script rewriting is also applied to it.

I see -- in that case, gitweb.perl should indeed be fixed.

Still however, for the Perl tests (t/t9700/test.pl in my branch) we 
don't have a Makefile, so the only way for them to pick up the right 
Git.pm module is modifying PERL5LIB in test-lib.sh. [1]  I just realized 
that we not only don't need to set GITPERLLIB in this case, but we 
should actually unset it so that user-set paths don't cause a wrong 
version of Git.pm to be loaded.  I'll send a new patch.

-- Lea

[1] Or alternatively adding some (lengthy and cwd-dependent) "use lib 
..." statement at the top of every Perl test file, but that doesn't seem 
preferable given that we can solve this centrally in test-lib.sh.