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

Support indirect-object method dispatch used by Set::IntSpan

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
perl

Research direction

Start by running the focused Set::IntSpan test in t/real_set.t, especially the indirect calls around line 22, on both JVM and interpreter backends. Trace the parser/compiler handling of these calls and compare related parser work in issues #1166 and #1314. Done means all four forms dispatch correctly, regression coverage is added, and the full 1,947-test suite passes.

Written by the indexing model from the issue text.

Description

area:cpan-port area:parser bug

Summary

Set::IntSpan 1.19 fails one upstream test under PerlOnJava because valid Perl indirect-object method syntax is resolved as a call to a nonexistent main:: subroutine.

Reproduction

Run the normal Set::IntSpan 1.19 test suite. The focused failure is t/real_set.t, which contains calls such as:

my $set_2 = union $set "1-5,8-9";
my $set_3 = union $set $set_2;
my $set_4 = union $set +[1, 5, 2, 8, 9, 1, 3, 4, 9];

These are valid Perl indirect-object method calls. The union method is implemented by Set::IntSpan and is used through the object in $set.

Expected result

System Perl passes the complete upstream suite:

  • 20 test files
  • 1,947 tests
  • t/real_set.t passes all 4 tests

Actual result

PerlOnJava runs the first real_set.t operation successfully, then fails at the next indirect method call:

1..4
#real_set
#real_set:  union set -> -
ok 1
Undefined subroutine &main::union called at t/real_set.t line 22.

The archived CPAN run records:

Failed 1/20 test programs. 0/1944 subtests failed.

The focused t/real_set.t failure reproduces on both the JVM and interpreter backends.

Likely root cause

The parser/compiler recognizes the first form, union $set, sufficiently to execute the empty-set case, but does not consistently preserve the indirect-object method dispatch when additional arguments follow. It emits or resolves union as an ordinary bareword subroutine call in the main package instead of dispatching it as a method on $set.

This is a pure-Perl parser/runtime compatibility issue. Set::IntSpan contains no XS, C, XSLoader, DynaLoader, or FFI dependency, and the failure is independent of services or platform prerequisites.

Acceptance criteria

  • All indirect-object method forms used by Set::IntSpan t/real_set.t dispatch to the object method on both backends.
  • Set::IntSpan 1.19 passes all 1,947 upstream tests on JVM and interpreter backends.
  • Add project-owned regression coverage for an indirect method call with no extra argument, a string argument, an object argument, and an array-reference argument.
  • Preserve existing parsing behavior for ordinary bareword subroutine calls and malformed syntax.

Evidence

  • CPAN run: 20260918-141920-96054
  • Distribution: Set-IntSpan-1.19
  • Failing test: t/real_set.t, line 22 (union $set "1-5,8-9")
  • System Perl: PASS, 20 files / 1,947 tests
  • PerlOnJava: FAIL, 1 file; the run reached 1,944 tests before aborting
  • JVM and interpreter: focused failure reproduced

Related issues

  • #1166 tracks valid fully-qualified indirect-object constructor forms. It covers a related parser area, but not this unqualified indirect-object method dispatch form.
  • #1314 tracks bareword filehandle method dispatch used by Expect. It is related at the method-dispatch level, but this failure involves a normal Perl object and does not depend on filehandle or IO behavior.

This issue should be coordinated with those parser/runtime fixes, while retaining Set::IntSpan as independent regression coverage.

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.