Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Parser rejects valid block argument syntax in Resource::Silo

Open
#1,491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java, perl
Domain
compilers

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
Perl
Stars
64
Forks
6
Avg merge
5h 11m
Merged PRs (30d)
168

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.