test: comprehensive coverage for clone($ref, $depth)#134
Draft
Koan-Bot wants to merge 2 commits into
Draft
Conversation
The depth parameter controls how many container levels are deep-copied vs shared. Only 2 tests in t/03-scalar.t exercised it (and only for COW string refs at depth=2). New test file covers 36 cases across: - depth=0 (no-op / same SV returned) - depth=1 (shallow clone — inner refs shared) - depth=2 (two-level clone — leaf refs shared) - depth=-1 (default unlimited deep clone) - mixed array/hash nesting - blessed objects at various depths - circular references with depth limits - scalar references (RV traversal doesn't consume depth) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
install-with-cpm@v1 regressed on Perl 5.8-5.22 after a recent cpm update requiring Perl 5.24+. Bump to @v2 for action-based jobs and use direct `cpm install` in the Docker-based Linux matrix (where cpm is pre-installed). Matches the approach approved by @atoomic in PR garu#120. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
t/28-depth-parameter.twith 36 tests covering theclone($ref, $depth)API.Why
The depth parameter is a user-facing feature but had almost zero dedicated test
coverage — only 2 assertions in
t/03-scalar.t(COW string refs at depth=2).No tests verified the actual depth-limiting behavior: sharing vs cloning at
each level, interaction with blessed objects, circular refs, or mixed structures.
How
Tests are organized by depth value and structure type:
Testing
All 36 tests pass on macOS system Perl. Full existing test suite unaffected.
🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 228 insertions(+)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline