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

Re: [PATCH] instaweb: make the perl path configurable

From
Jakub Narębski <jnareb@gmail.com>
Date
Jun 12, 2013, 21:03 UTC
Message-ID
<CANQwDweOR_wAJh5sitai6yFED4XKrptoBKn0P=PF0zk89ze3fA@mail.gmail.com>
In-Reply-To
<51B8C271.9030105@brokenzipper.com>

On Wed, Jun 12, 2013 at 8:48 PM, Charles McGarvey <chazmcgarvey@brokenzipper.com> wrote:

Show 25 quoted lines
> On 06/12/2013 08:00 AM, Jakub Narebski wrote:
>> Charles McGarvey <chazmcgarvey <at> brokenzipper.com> writes:
>>
>>> It is convenient for the user to be able to customize the path to perl if they
>>> do not want to use the system perl.  This may be the case, for example, if the
>>> user wants to use the plackup httpd but its extra dependencies are not
>>> installed in the system perl; they can set the perl path to a perl that they
>>> install and have control over in their own home directory.
>>
>> Is it really necessary?  There is always PERL5LIB if one wants to use Perl
>> modules installed in one's own home directory.  If one is using local::lib
>> one has it "for free".
>
> Yes, that's right.  Using PERL5LIB would solve the example problem in the
> commit message, and it would even be pretty simple to set up using local::lib.
>  So, no, this isn't strictly necessary.
>
>> If they do not want to use system perl there is always perlbrew.
>
> Well, perlbrew is actually what I had in mind for this patch.  Without it, it
> seems like the perl path -- which is configured while building git.git so is
> not easily changed by the user -- is "hard-coded" in the shebang line of the
> plackup script file which is then made executable and exec'd, to start the
> httpd.  Given that process, I don't see how that code allows the user to use
> any other perl, or am I missing something?

I am sorry, this is my mistake. Of course if one is using perlbrew then one wants to use perlbrew perl (nb. how does "perlbrew switch" work?), not necessarily system perl hardcoded during installation time.

> If adding a new config variable seems too heavy-handed for such a trivial
> problem, another approach would be to use the first perl in PATH
Hmmm... git moved out of using first "perl" in PATH...
>                                                                                               and fall back
> on the git.git build system-configured perl if there is no perl in PATH.
How to do this?
[...]
> In short summary, this patch isn't necessary because everyone could use
> local::lib to manage dependencies not installed at the system level, but I
> think this patch is desirable for those of us who use perlbrew and not
> local::lib.  Of course, I'm open to alternatives and other suggestions.
One other thing to think about is: why here, and not other places?

Nb. for short Perl scripts not using extra modules we pick first "perl" in PATH, IIRC...

-- 
Jakub Narębski
Previous: Charles McGarveyNext: Charles McGarvey
Message 4 of 5 in “instaweb: make the perl path configurable”
  1. instaweb: make the perl path configurableCharles McGarvey, Jun 11, 2013
  2. Jakub NarebskiJun 12, 2013
  3. Charles McGarveyJun 12, 2013
  4. Jakub NarębskiJun 12, 2013
  5. Charles McGarveyJun 12, 2013

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.