Subject: Re: [PATCH] global: resolve Perl executable via PATH

From: Junio C Hamano <[email-masked]>
Date: Wed, 05 Apr 2023 11:44:14 -0700

Patrick Steinhardt <[email-masked]> writes:

>> I don't know what the right choice is for upstream Git, it
>> can easily be argued in either direction. :)
>
> I agree, there is no clearly-superior choice -- both have their merits.
> I'll probably send a v2 that only munges internal scripts that are used
> as part of our build and testing infrastructure. That's the area I care
> most about in this context anyway.

My preference is 

 (1) not to touch scripts that are processed by Makefile to use
     $PERL_PATH,

 (2) fix callers of "./foo.pl" to invoke "$PERL_PATH ./foo.pl" where
     the perl () { command "$PERL_PATH" "$@" } wrapper is not
     avialable, and

 (3) fix them to use "perl foo.pl" where the wrapper is visible.

That way, we can wean ourselves away from the assumption that perl
interpreter should exist at /usr/bin/perl without introducing a new
assumption that everybody's env should exist at /usr/bin/env.  There
may already be scripts that assume "#!/usr/bin/env foo" is
acceptable, but fixing them would be outside the scope of this
discussion, I would say.

Thanks all for a good discussion.