<div dir="ltr">My vague recollection of such a conversation was summarized in this post: <a href="https://jmmv.dev/2016/09/env-considered-harmful.html">https://jmmv.dev/2016/09/env-considered-harmful.html</a><div><br></div><div>I'm generally pro /usr/bin/env but they do make some good points in the above that are worth consideration.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><table cellspacing="0" cellpadding="0" width="410" style="font-family:"Times New Roman""><tbody><tr><td colspan="2"><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"></p></td></tr></tbody></table><table cellspacing="0" cellpadding="0" width="450" style="font-family:"Times New Roman""><colgroup><col width="99"><col><col></colgroup><tbody><tr><td width="300"><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Martin Renvoize</strong></p></td><td rowspan="2"><p style="line-height:20px;margin:0px"><a href="https://www.ptfs-europe.com" border="0" target="_blank"><img src="https://www.ptfs-europe.com/wp-content/uploads/2018/10/ptfs-logo-full-email-sig.png" width="" height="" border="0"></a></p></td></tr><tr><td colspan="2"><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)">Development Team Manager</p><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)">Community Release Manager (19.11, 20.05)<br></p><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><br></p></td></tr><tr><td colspan="2"><p style="font-family:Arial;margin:0px"></p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Phone:</strong> +44 (0) 1483 378728</p></td><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Mobile:</strong> +44 (0) 7725 985 636</p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Email:</strong> <a href="mailto:martin.renvoize@ptfs-europe.com" style="color:rgb(45,92,136)" target="_blank">martin.renvoize@ptfs-europe.com</a><br></p></td><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><strong>Fax:</strong> +44 (0) 800 756 6384</p></td></tr><tr><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><br></p></td><td><p style="font-family:Arial;font-size:12px;line-height:20px;margin:0px;color:rgb(45,92,136)"><a href="https://www.ptfs-europe.com" style="color:rgb(45,92,136)" target="_blank">www.ptfs-europe.com</a></p></td></tr><tr><td><p style="font-family:Arial;margin:0px"> </p></td></tr><tr><td><p style="font-family:Arial;margin:0px"> </p></td></tr><tr><td><p style="font-family:Arial;margin:0px"> </p></td></tr></tbody></table><table cellspacing="0" cellpadding="0" style="font-family:"Times New Roman";border-top:1px solid rgb(194,194,194);padding:20px 0px 0px;margin:0px"><tbody><tr><td><p style="font-family:Arial;font-size:12px;color:rgb(45,92,136);margin:0px">Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30</p><br><p style="font-family:Arial;font-size:12px;color:rgb(45,92,136);margin:0px">The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at <a href="mailto:info@ptfs-europe.com" target="_blank">info@ptfs-europe.com</a></p></td></tr></tbody></table><span style="font-size:12.8px"><br><br></span></div></div><div dir="ltr"></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 13 Oct 2020 at 10:09, Jonathan Druart <<a href="mailto:jonathan.druart@bugs.koha-community.org">jonathan.druart@bugs.koha-community.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I vaguely remember I had this discussion with someone, somewhere.<br>
And I have been told it was not a good idea.<br>
But I cannot remember why, who, where...<br>
<br>
Le mar. 13 oct. 2020 à 01:19, <<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>> a écrit :<br>
><br>
> Hi all,<br>
><br>
><br>
><br>
> I was looking at “Bug 20582 - Turn Koha into a Mojolicious application” when I noticed that some of the scripts were using “#!/usr/bin/env perl” instead of “#!/usr/bin/perl”. While there is no requirement in the Coding Guidelines to use “#!/usr/bin/perl”, I thought it would be best for all our Perl scripts to be consistent.<br>
><br>
><br>
><br>
> However, now I’m weighing up the options.<br>
><br>
><br>
><br>
> Conceptually, using “#!/usr/bin/env perl” means that we can use perlbrew/plenv (or manually provide a different Perl in our $PATH) when running these scripts, so that we don’t have to use the system Perl located at /usr/bin/perl.<br>
><br>
><br>
><br>
> That said, I was concerned about how most CGI scripts have “#!/usr/bin/perl” in them and the implications that might have if we invoked Starman/Morbo/Hypnotoad with a different Perl, but looking at Plack::App::CGIBin, CGI::Emulate::PSGI, Plack::App::WrapCGI, CGI::Compile, and Koha::App::Plugin::CGIBinKoha makes me think that the shebang in CGI scripts is ignored when using these Perl application servers, since they’re just read as Perl code and not handed to the exec() family of kernel syscalls.<br>
><br>
><br>
><br>
> Starman/Morbo/Hypnotoad have been installed with /usr/bin/perl shebangs, so they’ll use the system Perl by default, but I think if they were installed using plenv and Carton for instance that they’d have their shebangs rewritten appropriately. We could also invoke Starman/Morbo/Hypnotoad with the version of Perl that we desire.<br>
><br>
><br>
><br>
> So ultimately… I suppose the most reasonable thing to do is probably to mandate “#!/usr/bin/perl” for all Koha Perl scripts? If someone does want to use a different Perl, I suppose the onus is on them to make sure they execute Koha Perl scripts with a different Perl binary?<br>
><br>
><br>
><br>
> Also, do people think there is a point in repairing existing Koha Perl scripts that have ‘#!/usr/bin/env perl’ instead of ‘#!/usr/bin/perl’?<br>
><br>
><br>
><br>
> Cheers,<br>
><br>
><br>
><br>
> David Cook<br>
><br>
> Software Engineer<br>
><br>
> Prosentient Systems<br>
><br>
> 72/330 Wattle St<br>
><br>
> Ultimo, NSW 2007<br>
><br>
> Australia<br>
><br>
><br>
><br>
> Office: 02 9212 0899<br>
><br>
> Online: 02 8005 0595<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Koha-devel mailing list<br>
> <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
> <a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
> website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
> git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
> bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div>