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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

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 and fall back
on the git.git build system-configured perl if there is no perl in PATH.
However, considering the nature of perlbrew, the user may have many different
perls installed and multiple terminals open with shells configured for
different perls.  To make the instaweb command search the PATH for perl would
introduce some unpredictability; the command would succeed or fail depending
on whether or not the perl being "used" in the current shell has the plackup
httpd dependencies installed.  So I think I prefer the ability to configure
which perl to have git always use for instaweb over this approach.

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.

Thanks Jakub,

-- 
Charles McGarvey

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]