New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect perl6 in hashbang #14661
Comments
From @LeontThis is a bug report for perl from fawaka@gmail.com, Currently, when perl tries to run a script and it encounters a hashbang The attached patch tries to fix that, so that #!perl6 files will DWIM. Flags: Site configuration information for perl 5.20.1: Configured by leon at Tue Oct 21 13:31:28 CEST 2014. Summary of my perl5 (revision 5 version 20 subversion 1) configuration: Platform: @INC for perl 5.20.1: /home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/x86_64-linux-thread-multi /home/leon/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_64-linux-thread-multi Environment for perl 5.20.1: PATH=/home/leon/.rakudobrew/bin:/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.1/bin:/home/leon/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PERLBREW_PATH=/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.1/bin |
From @Leont0001-Respect-hashbangs-containing-perl6.patchFrom f39a39ab79624a58283ef25ddb94a2b39f73ac06 Mon Sep 17 00:00:00 2001
From: Leon Timmermans <fawaka@gmail.com>
Date: Sun, 19 Apr 2015 13:03:28 +0200
Subject: [PATCH] Respect hashbangs containing perl6
---
toke.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/toke.c b/toke.c
index 294cb8f..077ab08 100644
--- a/toke.c
+++ b/toke.c
@@ -4863,6 +4863,8 @@ Perl_yylex(pTHX)
d = instr(s,"perl -");
if (!d) {
d = instr(s,"perl");
+ if (d && d[4] == '6')
+ d = NULL;
#if defined(DOSISH)
/* avoid getting into infinite loops when shebang
* line contains "Perl" rather than "perl" */
--
1.9.1
|
From zefram@fysh.orgLeon Timmermans wrote:
That #! hack is obsolete. We should not change its behaviour for perl6. -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @rjbs* Zefram <zefram@fysh.org> [2015-04-19T10:12:48]
I find both sides of this tempting, because I constantly write "perl Obviously, I'm just a single data point here. My gut, though, is that this Anybody care to convince me otherwise? -- |
From @LeontOn Tue, May 26, 2015 at 1:20 PM, Ricardo Signes <perl.p5p@rjbs.manxome.org>
There are programs out there that depend on perl acting as a switchbox, in Leon |
From @ap* Leon Timmermans <fawaka@gmail.com> [2015-06-20 21:50]:
+1 It doesn’t even add any conceptual complexity – all behaviours Regards, |
From @ribasushiOn 06/20/2015 09:47 PM, Leon Timmermans wrote:
+1 |
From @rjbs* Leon Timmermans <perlbug-followup@perl.org> [2015-04-19T09:53:21]
Okay, go for it. -- |
From @avarOn Sun, Apr 19, 2015 at 3:53 PM, Leon Timmermans
I think this patch makes sense, but I wonder if other cases could also #!/bin/sh => exec You patch would alter the behavior of these: #!perl6 => exec I think that makes sense, but I wonder if we're being overly eager |
From perl@profvince.comCan we have support for php and python next? Vincent |
From zefram@fysh.orgVincent Pit (VPIT) wrote:
Already got that. perl does general shebang redirection for any shebang -zefram |
From net@profvince.comLe 22/06/2015 09:49, Zefram a écrit :
Thanks, that makes sense then. |
From @ikegamiOn Mon, Jun 22, 2015 at 8:36 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com>
I think that's a typo? |
Given the perl6 -> raku namechange, I think this ticket can be closed :-) |
Migrated from rt.perl.org#124346 (status was 'open')
Searchable as RT124346$
The text was updated successfully, but these errors were encountered: