[Bioperl-l] standardize shebang line in bioperl scripts

Carnë Draug carandraug+dev at gmail.com
Tue Sep 4 14:26:15 UTC 2018


On Mon, 3 Sep 2018 at 23:21, Fields, Christopher J
<cjfields at illinois.edu> wrote:
> On August 29, 2018 at 7:12:51 AM, cjfields at illinois.edu (cjfields at illinois.edu) wrote:
>> On August 29, 2018 at 6:36:42 AM, Carnë Draug (carandraug+dev at gmail.com) wrote:
>>>
>>> Hi
>>>
>>> I was wondering if there's any consensus about what should be used in
>>> the shebang line. Looking at the existing scripts, I found:
>>>
>>> #!perl
>>> #!/usr/bin/env perl
>>> #!/usr/bin/perl
>>> #!/usr/bin/perl -w
>>>
>>> Using the bioperl distzilla plugin bundle, 'perl' and '/usr/bin/perl'
>>> get converted to the path of perl used for the package installation.
>>> However, if '/usr/bin/env perl' it remains unmodified. This behaviour
>>> seems to be a bug in MakeMaker [1].
>>>
>>> To me it makes sense to have the shebang line replaced with the perl
>>> used for installation since that's the one that will have the rest of
>>> bioperl modules. But the most important thing, I think, is to be
>>> consistent.
>>>
>>> If no one opposes soon, I will change all of them to '/usr/bin/perl'
>>> so that it gets fixed during install.
>>>
>>> I will also replace the '-w' flag with the warnings pragma.
>>>
>>> Carnë
>>>
>>> [1] https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/58
>>
>> Yes, pretty inconsistent.  If this is for installation purposes and
>> is bundled with a specific version of perl along with it’s installed
>> dependencies, I would say switch to the perl used for installation.
>>
>> Personally, I use '#!/usr/bin/env perl’ for most cases, though this
>> is because I work primarily in a cluster environment where the
>> version of perl may change depending on what is loaded into the path
>> at any point.  However this is also primarily for development, not
>> for a typical user.
>>
>> chris
>>
>
> Hi Carnë,
>
> I’d go ahead and implement your plan.  My suspicion is that this
> will affect very few users.
>
> chris

I have pushed the changes.  This required changes to the following
repos:

  Bio-Biblio
  Bio-EUtilities
  Bio-SearchIO-Writer-BSMLResultWriter
  bioperl-live

Not sure if the change is worth a new patch release.  I also did not
mention the change on the Changelog because again, I'm not sure if
this worth a note.

The issue remains on the Bio-Graphics package but that's not really
part of bioperl anyway and I never get a reply from them about bug
reports and patches anyway.

I have also removed the `-w` flag on all other modules and scripts,
which covered many other repositories, but I done it on the day I sent
the first email.

Carnë



More information about the Bioperl-l mailing list