Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

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

From: Jakub Narębski <hidden>
Date: 2016-06-15 22:57:43

On Wed, Jun 12, 2013 at 8:48 PM, Charles McGarvey
[off-list ref] wrote:
On 06/12/2013 08:00 AM, Jakub Narebski wrote:
quoted
Charles McGarvey <chazmcgarvey <at> brokenzipper.com> writes:
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help