develooper Front page | perl.perl5.porters | Postings from May 2016

Re: 5.24.0 + cpan

Thread Previous | Thread Next
Aristotle Pagaltzis
May 17, 2016 08:13
Re: 5.24.0 + cpan
Message ID:
* Zefram <> [2016-05-16 21:55]:
> That retains the rather crap behaviour of looking only at the *first*
> instance of "perl" on the line. It would make more sense to look for
> "perl6" either at *all* instances of "perl" (requiring all to be
> "perl6" to enable chaining) or just in the basename part of the
> interpreter path.

That would require adding new conditions that did not so far exist.

I supported the patch because it only narrowed the existing conditions
without adding new ones, but failed to consider what the conditions are:
the existing check looks for `perl` *anywhere* in the path, which means
it already gets the wrong result for e.g. #!/opt/perl/bin/bash

This cannot be fixed without adding new conditions, and Perl 6 support
is not possible without fixing it, so there is no way to support Perl 6
without adding new conditions, which I do not support.

> But I go back to what I said about this last year, when the "perl6"
> change was originally proposed: the #! hack is obsolete. We should
> either leave it totally unchanged (as it was pre-5.23) or remove it
> entirely.

It cannot be removed because it would be near-impossible to find out how
large a fallout we would cause that way. So it should be frozen, and the
patch should be reverted.

But we should also figure out and supply a polyglot oneliner that says
“exec me under perl6 if this is a perl5”, similar to the shell/perl5 one
that is given in perlrun.pod (the `if $running_under_some_shell` hack).

Currently I am stumped by at least this bit, though:   Errr… what?!

Aristotle Pagaltzis // <>

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