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

Đang mở
#2,139 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, perl
Lĩnh vực
compilers

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Perl
Star
67
Fork
8
Merge trung bình
5 giờ 12 phút
Pull request đã merge (30 ngày)
131

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fglock/PerlOnJava

Tất cả issue của fglock/PerlOnJava

Issue tương tự

Thêm issue về Perl

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.