Skip to content

fix: preserve $. across borrowed handle scope cleanup - #1935

Merged
fglock merged 1 commit into
masterfrom
feature/issue-1933-input-line-number
Oct 30, 2026
Merged

fglock merged 1 commit into
masterfrom
feature/issue-1933-input-line-number

Conversation

@fglock

@fglock fglock commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Preserve $. when JVM scope cleanup sees a borrowed anonymous IO alias while a live owner remains.
  • Add regression coverage for IO::Handle->getline and input_line_number on scalar-backed handles.
  • Record the compatibility fix in the work-in-progress changelog.

Fixes #1933.

Validation

  • nice -n 19 make — passed on current master 55c1bfce plus this fix (candidate 76478da8).
  • Focused unit test — passed under system Perl, JVM, and interpreter.
  • Pod-Elemental-Transformer-List 0.102001 — all 3 files and 16 tests passed on JVM and interpreter with the archived CPAN dependency load order.
  • make check-links and lychee --offline docs/about/changelog.md — passed.

Keep the last-read handle active when JVM scope cleanup sees a temporary alias
of an anonymous IO glob that still has a live owner. This preserves Perl's `$.`
and IO::Handle->input_line_number behavior through wrapper subroutines.

Add focused coverage for scalar-backed IO::Handle reads and record the fix in
the work-in-progress changelog. Fixes #1933.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock force-pushed the feature/issue-1933-input-line-number branch from 53ff75b to bac75c7 Compare October 30, 2026 11:23
@fglock
fglock marked this pull request as ready for review October 30, 2026 11:24
@fglock
fglock force-pushed the feature/issue-1933-input-line-number branch from bac75c7 to 76478da Compare October 30, 2026 12:18
@fglock
fglock merged commit 90c4d59 into master Oct 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JVM backend loses IO::Handle input_line_number

1 participant