refactor: replace deprecated 'use base' with BEGIN require + @ISA#1063
Draft
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Draft
refactor: replace deprecated 'use base' with BEGIN require + @ISA#1063Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Conversation
Replace all 78 occurrences of 'use base' in lib/ with the pattern:
BEGIN { require Module; our @isa = qw(Module) }
This follows the convention established in Test2::Tools::Tiny and
eliminates the dependency on the deprecated base.pm pragma.
Changes include both runtime code and POD documentation examples
to maintain consistency throughout the codebase.
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
Replace all 78 occurrences of
use baseinlib/withBEGIN { require ...; our @ISA = qw(...) }.Why
The
basepragma is deprecated. This aligns the entire codebase with the pattern already established inTest2::Tools::Tiny(line 15) and follows the direction set by PR #1021.How
Mechanical replacement across all 78 files:
use base 'Foo'→BEGIN { require Foo; our @ISA = qw(Foo) }use base qw(Foo)/use base qw/Foo/→ same patternNo behavioral change —
BEGIN { require ... }is semantically equivalent to compile-time loading viause base.Testing
Full test suite passes: 370 files, 3470 tests, all green.
🤖 Generated with Claude Code