By setting PERL5LIB for the tests, we enable Perl test scripts to just say "use Git;" without adding the GITPERLLIB paths to @INC beforehand. Signed-off-by: Lea Wiemann <LeWiemann@xxxxxxxxx> --- Junio C Hamano wrote: > Lea Wiemann <lewiemann@xxxxxxxxx> writes: >> How about [setting PERL5LIB in] test-lib.sh? > > Sure, I think that would be sensible. Actually, GITPERLLIB becomes redundant in that case, so I've simply replaced it with PERL5LIB in test-lib.sh. I've tested the patch: all scripts pick up the right Git.pm, and all tests still pass. It also preserves existing PERL5LIB variables correctly. Btw, I'm assuming that it's OK to post small patches (like this one) as replies. If you or anyone else would prefer independent patches to always start a new thread, please let me know. -- Lea t/test-lib.sh | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 99b63da..2f86831 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -454,8 +454,9 @@ GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_NOGLOBAL=1 export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL -GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git -export GITPERLLIB +test -n "$PERL5LIB" && PERL5LIB=":$PERL5LIB" +PERL5LIB="$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git$PERL5LIB" +export PERL5LIB test -d ../templates/blt || { error "You haven't built things yet, have you?" } -- 1.5.5.GIT -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html