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

オープン
#2,139 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, perl
領域
compilers

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Perl
スター
67
フォーク
8
平均マージ
5時間 12分
マージ済み PR(30日)
131

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。