Petr Baudis <pasky@xxxxxxx> writes: > So the purpose of the original patch was to make it play nicely with > $PERLLIB, but unshifting helps nothing, since: > > There's default @INC > Perl spots PERLLIB and unshifts @INC > We then unshift @INC too, taking precedence I tried this: 0. check out the branch that has the Perly git ("pu"). build and install normally to have a perfectly working version accessible on your usual $PATH. 1. apply the patch [1] below to make it use "use lib" instead of "unshift". 2. break perl/Git.pm being built to pretend we introduced a bug in the work in progress by applying the patch [2] below. 3. without installing the broken Git.pm, run "make test", and see a test that uses "git pull" and needs to create a true merge succeed. It tells me that everything including perl/Git.pm is GOOD, and I'd find the breakage only after installing and running the test again. If you make the freshly built script to say "use lib" to use Git.pm and its friends from the installed location, it defeats the attempt by test-lib.sh to override it to test what we freshly built -- the use of "unshift @INC" is to work that around and is parallel to the way Python stuff works around the same problem. [Footnotes] *1* "use lib" patch. diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl index 1b23fa1..3a42950 100755 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@ -5,7 +5,7 @@ # # Read .git/FETCH_HEAD and make a human readable merge message # by grouping branches and tags together to form a single line. -BEGIN { unshift @INC, '@@INSTLIBDIR@@'; } +use lib '@@INSTLIBDIR@@'; use strict; use Git; use Error qw(:try); *2* "break Git.pm" patch. diff --git a/perl/Git.pm b/perl/Git.pm index b4ee88b..34b4f12 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -6,6 +6,7 @@ Git - Perl interface to the Git version package Git; +syntax error -- kill me use strict; - : 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