Skip to content

refactor: replace deprecated 'use base' with BEGIN require + @ISA#1063

Draft
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/replace-use-base
Draft

refactor: replace deprecated 'use base' with BEGIN require + @ISA#1063
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/replace-use-base

Conversation

@Koan-Bot
Copy link

@Koan-Bot Koan-Bot commented Mar 7, 2026

What

Replace all 78 occurrences of use base in lib/ with BEGIN { require ...; our @ISA = qw(...) }.

Why

The base pragma is deprecated. This aligns the entire codebase with the pattern already established in Test2::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 pattern
  • Updated both runtime code and POD documentation examples for consistency

No behavioral change — BEGIN { require ... } is semantically equivalent to compile-time loading via use base.

Testing

Full test suite passes: 370 files, 3470 tests, all green.

🤖 Generated with Claude Code

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>
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.

1 participant