Parser executes trailing comment text on shebang lines
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
Direzione di ricerca
Start with the t/testhelp shebang reproduction and compare its behavior across the JVM and interpreter backends. Run the focused command, then the relevant subprocess-response cases in t/gzip.t. Done means the complete shebang comment is discarded, @ARGV retains the three arguments, and the CGI-Compress-Gzip response tests pass without annotation or argument text.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
PerlOnJava does not fully discard a shebang/comment line when it contains a second # comment marker. Both backends execute text from the trailing Perl::Critic annotation as Perl code/output and consequently mishandle the script arguments that follow.
Reproduction
CGI-Compress-Gzip 1.03 contains t/testhelp, whose first line is:
#!perl -w ## no critic (RequireVersionVar)
Run the helper with its normal test arguments:
jperl -Iblib/arch -Iblib/lib t/testhelp -DHTTP_ACCEPT_ENCODING=gzip simple 'Hello World!'
Expected, as on standard Perl: a gzip response for Hello World!.
Actual on both the JVM and interpreter backends: the response is uncompressed, reports that the user agent does not accept gzip, and its body begins with:
nocritic(RequireVersionVar)-DHTTP_ACCEPT_ENCODING=gzipsimpleHello World!
The trailing comment contents and command-line arguments must not become program output. Perl should discard the complete shebang/comment line before compiling the script.
CPAN evidence
In CPAN random run 20260925-103132-20451, CGI-Compress-Gzip 1.03 failed 21 of 44 subtests in t/gzip.t on the JVM backend. The subprocess-response cases are directly caused by this parser defect. The same source passes all 44 tests under the standard-Perl oracle.
The focused helper reproduction also fails on the interpreter backend, so this is shared parser behavior rather than a JVM-only emission issue.
Acceptance criteria
- A script beginning with
#!perl -w ## no critic (RequireVersionVar)does not emit any part of that line. - Its
@ARGVremains-DHTTP_ACCEPT_ENCODING=gzip,simple, andHello World!when launched with those arguments. - The focused reproducer passes on standard Perl, PerlOnJava JVM, and PerlOnJava interpreter backends.
- CGI-Compress-Gzip's subprocess-response tests no longer contain the annotation or argument text in their bodies.
- Lingua principale
- Perl
- Stelle
- 64
- Fork
- 6
- Merge medio
- 4h 55m
- PR unite (30g)
- 169
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fglock/PerlOnJava
-
area:cpan-port area:unicode bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fglock/PerlOnJava#1341 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:regex area:unicode bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
fglock/PerlOnJava#1556 ·
I maintainer di solito rispondono entro 1 giorno
-
area:backend area:runtime bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
fglock/PerlOnJava#1554 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:runtime bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
fglock/PerlOnJava#1552 ·
I maintainer di solito rispondono entro 1 giorno
-
area:backend area:cpan-port bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
fglock/PerlOnJava#1548 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
openfoodfacts/openfoodfacts-server#14749 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rubocop/ruby-style-guide#982 ·
-
bug question
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RotherOSS/otobo#6172 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100