Skip to content

test: add object wrapping tests + fix Build.PL URLs#3

Merged
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/add-object-wrap-tests
Mar 19, 2026
Merged

test: add object wrapping tests + fix Build.PL URLs#3
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/add-object-wrap-tests

Conversation

@toddr-bot
Copy link
Collaborator

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

What

Adds comprehensive test coverage for object wrapping — the explicit TODO at the end of t/01-hole.t — and fixes outdated GitHub URLs in Build.PL.

Why

The test suite had 33 tests but zero coverage for object wrapping, which is a core feature of Safe::Hole. The # To do comment has been there since the test restructuring. Object wrapping involves AUTOLOAD dispatch, cross-compartment method calls, and inheritance — all worth testing.

The Build.PL URLs still pointed to toddr/Safe-Hole instead of cpan-authors/Safe-Hole.

How

  • New t/02-wrap-objects.t with 40 tests covering: basic method dispatch, arguments, list context, error propagation, undefined methods, inheritance, stateful mutations, standalone wrapping, multiple objects, code ref wrapping, and error cases (non-ref, type mismatch, invalid names).
  • Updated Build.PL meta URLs to cpan-authors/Safe-Hole and httphttps.

Testing

  • Full suite: 76 tests pass (36 existing + 40 new)
  • Tested on Perl 5.42.0

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 228 insertions(+), 3 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

@toddr-bot toddr-bot force-pushed the koan.toddr.bot/add-object-wrap-tests branch from 617bb11 to c608b1e Compare March 18, 2026 13:52
@toddr-bot
Copy link
Collaborator Author

Rebase: test: add object wrapping tests + fix Build.PL URLs

Branch koan.toddr.bot/add-object-wrap-tests rebased onto main and force-pushed.

Diff: 2 files changed, 228 insertions(+), 3 deletions(-)

Actions

  • Rebased koan.toddr.bot/add-object-wrap-tests onto upstream/main
  • Force-pushed koan.toddr.bot/add-object-wrap-tests to origin
  • CI polling timed out

CI

CI still running (timed out waiting).


Automated by Kōan

The test suite had an explicit "To do" for object wrapping tests since
the module was restructured. This adds 40 tests covering:

- Basic method dispatch through wrapped objects
- Method calls with arguments and list context returns
- Error propagation (die in wrapped methods)
- Undefined method calls on wrapped objects
- Inheritance (subclass methods + inherited methods)
- Stateful objects (mutations persist across calls)
- Standalone wrapping (wrap without compartment args)
- Multiple objects of the same class
- Wrapped code refs
- Error handling: non-ref, type mismatches, invalid names

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@toddr-bot toddr-bot force-pushed the koan.toddr.bot/add-object-wrap-tests branch from c608b1e to 56fc702 Compare March 18, 2026 21:37
@toddr-bot
Copy link
Collaborator Author

Rebase: test: add object wrapping tests + fix Build.PL URLs

Branch koan.toddr.bot/add-object-wrap-tests rebased onto main and force-pushed.

Diff: 1 file changed, 225 insertions(+)

Review feedback was analyzed and applied.

Actions

  • Resolved merge conflicts (1 round(s))
  • Rebased koan.toddr.bot/add-object-wrap-tests onto upstream/main
  • Force-pushed koan.toddr.bot/add-object-wrap-tests to origin
  • CI passed

CI

CI passed.


Automated by Kōan

@toddr toddr marked this pull request as ready for review March 19, 2026 05:49
@toddr toddr merged commit 3ad1630 into cpan-authors:main Mar 19, 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.

2 participants