Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Parser rejects valid block argument syntax in Resource::Silo

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

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/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

The issue is in the parser, likely in the grammar for function calls with block arguments. Start by examining the parser source code, perhaps under a 'grammar' or 'parse' directory. Look for how set_prototype or similar functions with block and subsequent arguments are handled. The minimal reproducer my $x = set_prototype { 1 } q{}; should be added as a test case. Run the existing parser tests to see the failure, then debug by comparing the parse tree with standard Perl's output.

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

Mô tả

area:parser bug

Summary

PerlOnJava rejects valid Perl syntax used by Resource::Silo 0.1703. The
failure occurs while compiling the module, before its tests can run.

Reproduction

This standard-Perl expression is accepted by Perl 5:

my $shortcut_sub = set_prototype {
    $instance //= $target->new;
} '';

PerlOnJava reports a syntax error at the closing expression. The smallest
reproducer is:

use Scalar::Util qw(set_prototype);
my $x = set_prototype { 1 } q{};

Evidence

  • Distribution: Resource-Silo 0.1703
  • CPAN random tester run: 20260922-180448-60378
  • Failing test: t/001-load.t, during use Resource::Silo
  • System Perl: PASS, 39 test files and 148 tests
  • PerlOnJava JVM backend: FAIL
  • PerlOnJava interpreter backend: FAIL
  • The minimal reproducer passes on system Perl and fails on both PerlOnJava
    backends.
  • The distribution is pure Perl and does not require XS or native code.

Expected behavior

PerlOnJava should parse and execute a function call whose first argument is an
anonymous block followed by a second expression, matching standard Perl's
handling of set_prototype { ... } ''.

Acceptance criteria

  • Add focused project-owned regression coverage for this syntax.
  • The regression passes on both JVM and interpreter backends.
  • Resource-Silo 0.1703 passes its complete upstream test suite.
Ngôn ngữ chính
Perl
Star
64
Fork
6
Merge trung bình
5 giờ 38 phút
Pull request đã merge (30 ngày)
170

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.