Parser rejects valid block argument syntax in Resource::Silo
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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-Silo0.1703 - CPAN random tester run:
20260922-180448-60378 - Failing test:
t/001-load.t, duringuse 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-Silo0.1703 passes its complete upstream test suite.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 6
- 平均合并
- 5 小时 38 分钟
- 30 天内合并 PR
- 170
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
area:cpan-port area:unicode bug
难度 2/5 1-3 小时 新手友好度 88/100
fglock/PerlOnJava#1341 ·
-
area:backend area:runtime bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1511 ·
-
area:backend area:cpan-port bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1508 · 1 条评论 ·
-
area:cpan-port area:platform enhancement
难度 5/5 一周以上 新手友好度 30/100
fglock/PerlOnJava#1507 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1506 ·
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
documentation Needs Triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
trizen/youtube-viewer#456 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
connectivity 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
-
Common US ingredient names are not recognized, so about 12.4k US products miss an allergen warning 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
openfoodfacts/openfoodfacts-server#14657 · 4 条评论 ·