Skip to content

test: regression tests for issue #1 (undefined sub reporting)#12

Merged
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-issue-1-regression-test
Mar 21, 2026
Merged

test: regression tests for issue #1 (undefined sub reporting)#12
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-issue-1-regression-test

Conversation

@toddr-bot
Copy link
Collaborator

@toddr-bot toddr-bot commented Mar 19, 2026

What

Adds regression tests ensuring undefined subroutine calls are properly reported when arguments involve Safe::Hole wrapped objects.

Why

GitHub issue #1 (rt#122934) reported that f(x()) where x() returns a Safe::Hole-wrapped object silently swallowed the "Undefined subroutine" error. The bug was originally reported against Safe 2.35 / Safe::Hole 0.10 and cannot be reproduced on current Perl (Safe 2.47 / Safe::Hole 0.14). These tests lock in the correct behavior to prevent regression.

How

Four test cases in t/01-hole.t covering: wrapped-object arg via intermediate sub, direct wrapped call arg, plain scalar arg (baseline), and no-arg baseline.

Testing

make test — all 40 tests pass.

Closes #1

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 32 insertions(+), 1 deletion(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

…pan-authors#1)

Verify that calling an undefined subroutine reports an error even when
arguments involve Safe::Hole wrapped calls returning wrapped objects.
The original bug (rt#122934) was that $@ was not set in this scenario.
Cannot reproduce on current Perl/Safe, but these tests guard against
regression.

Closes cpan-authors#1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@toddr-bot toddr-bot force-pushed the koan.toddr.bot/fix-issue-1-regression-test branch from 54199bc to 10646a3 Compare March 19, 2026 06:21
@toddr-bot
Copy link
Collaborator Author

Rebase: test: regression tests for issue #1 (undefined sub reporting)

Branch koan.toddr.bot/fix-issue-1-regression-test rebased onto main and force-pushed.

Diff: 1 file changed, 31 insertions(+), 1 deletion(-)

Actions

  • Resolved merge conflicts (1 round(s))
  • Rebased koan.toddr.bot/fix-issue-1-regression-test onto upstream/main
  • Force-pushed koan.toddr.bot/fix-issue-1-regression-test to origin
  • CI passed

CI

CI passed.


Automated by Kōan

@toddr toddr marked this pull request as ready for review March 21, 2026 02:16
@toddr toddr merged commit 5d90f0c into cpan-authors:main Mar 21, 2026
21 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.

Undefined subroutines not reported when parameter is call to Safe::Hole wrapper

2 participants