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

Re: 5.24.0 + cpan

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
May 17, 2016 08:13
Subject:
Re: 5.24.0 + cpan
Message ID:
20160517081315.GA73296@plasmasturm.org
* Zefram <zefram@fysh.org> [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:
https://doc.perl6.org/language/5to6-perlfunc#exec   Errr… what?!

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About