Add Sub::Name module and fix @INC hook exception handling#324
Merged
Conversation
- Add SubName.java: Java implementation of Sub::Name::subname() - Add Sub/Name.pm: Perl wrapper using XSLoader - Fix ModuleOperators.java: Propagate exceptions from @inc hooks The @inc hook fix is required because InlineModule (used by Moo tests) relies on die() in hooks to hide modules. Previously, exceptions were caught and ignored, causing require to continue searching. Sub::Name::subname(NAME, CODE) is equivalent to Sub::Util::set_subname() and is used by Moo for debugging/caller information. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Add Phase 26: Sub::Name module and @inc hook fix - Remove moo-utils-_subname-Sub-Name.t from expected failures - Update test counts: 63/71 Moo tests passing Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
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.
Summary
Sub::Name Implementation
Sub::Name::subname(NAME, CODEREF) sets the name of a subroutine for debugging/caller purposes. This is equivalent to Sub::Util::set_subname().
Files added:
@inc Hook Fix
Before: When an @inc hook threw an exception (via die()), the exception was caught and ignored, continuing to search subsequent @inc entries.
After: Exceptions from @inc hooks are propagated, matching Perl's behavior.
This fix is required for InlineModule (used by Moo tests) which relies on die() in hooks to hide modules during testing.
Test plan
Generated with Devin