git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Try 2: Allow PERL_PATH="/usr/bin/env perl"

From
Bryan Larsen <bryan@larsen.st>
Date
May 3, 2007, 23:35 UTC
Message-ID
<463A71D7.5060506@larsen.st>
In-Reply-To
<7vfy6dzf25.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 13 quoted lines
> Bryan Larsen <bryan@larsen.st> writes:
> 
>> The perl scripts start with "#!/usr/bin/perl".  There is a mechanism
>> PERL_PATH in the Makefile to change this, but it currently doesn't work
>> with PERL_PATH="/usr/bin/env perl".
> 
> I do not get this whole business.  Why would you even want to
> support that to begin with?
> 
> The purpose of PERL_PATH is for you to tell git the path you
> have your Perl at.  It is not about supplying a small shell
> script that lets "env" to figure it out.
> 

Maybe PERL_PATH should be renamed PERL_SHEBANG or something. Because if you pass in something that doesn't work on a shebang line (longer than 32 characters, say), it just won't work.

I was under the impression that "#!/usr/bin/env perl" was the "right" way to invoke perl. But I'm not doing this because I want to do the "right" thing. I'm doing this because it makes this scenario work:

$ sudo port install git-core installing openssl... installing openssh... installing curl... installing expat...

$ ... $ git-send-email ... $ ...

$ sudo port install git-svn installing apr... installing subversion... installing perl... installing p5-svn-simple...

git-core works fine with stock perl, and we don't want to install extra megabytes of unneeded stuff if it really isn't needed.

Certainly there are other ways of making this work. But they're all uglier than doing the "right" thing of "/usr/bin/env perl".

cheers, Bryan

P.S. On Linux, "#!/usr/bin/env perl -w" doesn't work. On OS X it works fine.

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Try 2: Allow PERL_PATH="/usr/bin/env perl"”
  1. Try 2: Allow PERL_PATH="/usr/bin/env perl"Bryan Larsen, May 3, 2007
  2. Junio C HamanoMay 3, 2007
  3. Bryan LarsenMay 3, 2007
  4. Junio C HamanoMay 4, 2007
  5. Bryan LarsenMay 4, 2007
  6. Andrew RuderMay 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.