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

Re: [PATCH] perl shebangs: Use /usr/bin/env, not /usr/bin/perl

From: Randal L. Schwartz <hidden>
Date: 2016-06-15 22:48:50

quoted
quoted
quoted
quoted
"Ævar" == Ævar Arnfjörð Bjarmason [off-list ref] writes:
Ævar> Change the Perl Git utilities to use #!/usr/bin/env perl as a shebang
Ævar> instead of #!/usr/bin/perl. This makes e.g. git-send-email work if
Ævar> your personal perl has Net::SMTP::SSL, but your system perl
Ævar> doesn't.

Not a good idea in general.

Ævar> With this change all the code in Git that uses a shebang now uses
Ævar> /usr/bin/env, except those things that use /bin/sh and /bin/bash. All
Ævar> the Python code already used it, and some of the Perl code.

Sorry I didn't catch this earlier then.

I often have an "experimental" Perl earlier in my path than the
"official" Perl.  This would mean that I'd get different behaviors
running git from the command line than I would from automated tools, and
it would be relatively confusing.

The official Perl should be in /usr/bin or /usr/local/bin, and that's
the one you should use with Git.  *Or*, give the installer a knob to
configure.

But please don't use env.  Heck, some systems might not even *have*
env.  And some systems have it in /bin and not /usr/bin.  Don't ruin
portablity at this point, please.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[off-list ref] <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help