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

Aberta
#2,139 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java, perl
Domínio
compilers

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Perl
Estrelas
67
Forks
8
Merge médio
5h 12min
PRs com merge (30d)
131

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fglock/PerlOnJava

Todas as issues de fglock/PerlOnJava

Issues semelhantes

Mais issues de Perl

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.