Parser rejects indirect import call with slash argument (WWW::URLToys 1.28)

Aperta
#2,139 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, perl
Ambito
compilers

Direzione di ricerca

This is a grammar-level bug in PerlOnJava's statement parser, not in WWW::URLToys. Start by locating the grammar source (the .y/parser file that handles indirect method calls such as import Term::ReadLine /new/;) and the generated parser it feeds. Reduce the failing module to a one-line test script containing just require Term::ReadLine; import Term::ReadLine /new/; and run it through ./jperl to reproduce. Done means that snippet parses and dispatches to Term::ReadLine->import(/new/) like standard Perl, with a regression test added.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:cpan-port area:parser bug

Module

  • Distribution: WWW-URLToys 1.28
  • CPAN tester report: syntax error, 2026-11-13
  • System Perl: /usr/bin/perl 5.34.1 on macOS arm64; perl Makefile.PL && make test passes (the distribution's test only loads the module and prints its version).
  • PerlOnJava: timeout 120 ./jperl -Iblib/lib -Iblib/arch test.pl fails while loading the module:
    syntax error at blib/lib/WWW/URLToys.pm line 240, near "Term::ReadLine "

Reproducer and cause

At line 240, the module has this valid legacy indirect method call:

import Term::ReadLine /new/;

It follows require Term::ReadLine; and invokes import with the regex /new/ as an argument. Standard Perl accepts and executes this syntax. PerlOnJava reports a syntax error at the package name, showing that its statement parser does not accept the indirect method-call form with a slash-delimited argument in this position. The error is in parsing this valid call, before Term::ReadLine behavior is used.

Expected

The statement compiles and calls Term::ReadLine->import(/new/), matching standard Perl.

Lingua principale
Perl
Stelle
67
Fork
8
Merge medio
5h 12m
PR unite (30g)
131

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fglock/PerlOnJava

Tutte le issue di fglock/PerlOnJava

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.