[Bioperl-l] standardize shebang line in bioperl scripts
Fields, Christopher J
cjfields at illinois.edu
Tue Sep 11 21:08:12 UTC 2018
We generally have two sets of users:
1) Ones using the scripts installed from CPAN
2) Developers who may use the scripts directly
In case #1 I could see the benefits of using the perl version used for installation, as the dependencies should also be installed as well. Alternatively, in case #2 it makes sense to default to ‘/usr/bin/env’ to cover as many cases as we can. Case #1 is already set up.
On September 11, 2018 at 2:15:35 PM, Steven Lembark (lembark at wrkhors.com<mailto:lembark at wrkhors.com>) wrote:
On Wed, 29 Aug 2018 12:19:54 +0100
Carnë Draug <carandraug+dev at gmail.com> wrote:
> I was wondering if there's any consensus about what should be used in
> the shebang line. Looking at the existing scripts, I found:
> #!/usr/bin/env perl
> #!/usr/bin/perl -w
POSIX did away with non-absolute path #! lines.
#!/usr/bin/perl is largely unusable as it assumes you are using the
O/S installed versin of perl, which you usually aren't (unless you
want to use 5.8 on Centos or 5.10 on Redhat or 5.16 on Amazon linux).
Net result: "env" is the only sane way to go.
Luvly thing is that env might be installed in /bin/env or /usr/bin/env
depending on Linux vs. BSD vs. SysV roots of whatever you are running
Perl on (let alone Windows...).
The one most likely to work is:
linux habitually installs env into /bin with a symlink in /usr/bin;
BSD & SysV install it in /usr/bin maybe-without a symlink in /bin.
I any case using "/usr/bin/perl" either ties you to decade(s) out of
date perl with the O/S distro or forces you to update the disro perl,
which may break ancient pieces of the distro itself.
Steven Lembark 3920 10th Ave South
Workhorse Computing Birmingham, AL 35222
lembark at wrkhors.com +1 888 359 3508
Bioperl-l mailing list
Bioperl-l at mailman.open-bio.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bioperl-l