develooper Front page | perl.perl5.porters | Postings from July 2020

Re: Perl 7 - updates

Thread Previous | Thread Next
Branislav Zahradník
July 4, 2020 09:16
Re: Perl 7 - updates
Message ID:
On Sat, 4 Jul 2020 at 08:26, Todd Rinaldo <> wrote:

> > On Jul 3, 2020, at 8:36 PM, Darren Duncan <>
> wrote:
> >
> > On 2020-07-03 5:35 p.m., Todd Rinaldo wrote:
> >> As far as I understand, the Perl parser doesn't start parsing the code
> until it sees #!/usr/bin/perl in which case you just put use v7 after that
> line.
> >
> > I'm quite sure that is wrong.
> I assume you saw Tomasz's email about perl -x? I would have stated as much
> except I wrote that code 9 years ago and forgot what it did in the time
> inbetween :D
> > In fact I've heard it often argued that having a shebang line for the
> most part is an obsolete notion and it is best to NOT have it, especially
> as in the general case what it says is completely wrong.  What if your Perl
> lives somewhere else?  Or what if you're running Windows?
> >
> > Although a lot of that is addressed by using a different more adaptable
> shebang line like either of these:
> >
> >  #!perl
> >  #!which perl
> >  #!/usr/bin/which perl
> IMO this just leads to a script which runs a potentially unexpected perl
> based on your environment. That perl may or may not have the modules you
> need to run your script. Even EU::MM recognizes this and updates the #!  in
> scripts to match the perl that executed Makefile.PL
the environment is under control of the user and that's what you want ...
let the user control it.
I really hate when two scripts I need cannot be used (unmodified) together
because one has "use v5.10;" and another "no v5.10" (too lazy to think
about different version), both  with "/usr/bin/perl" shebang.

Btw, my prefered shebang is "/usr/bin/env perl"

> Todd

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About