test: regression tests for issue #1 (undefined sub reporting)#12
Merged
toddr merged 1 commit intocpan-authors:mainfrom Mar 21, 2026
Merged
Conversation
…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>
54199bc to
10646a3
Compare
Collaborator
Author
Rebase: test: regression tests for issue #1 (undefined sub reporting)Branch Diff: 1 file changed, 31 insertions(+), 1 deletion(-) Actions
CICI passed. Automated by Kōan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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())wherex()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.tcovering: 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