From 840da396f3a239928789ef89fd02c45859965be8 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 16 Feb 2026 12:46:32 +0000 Subject: [PATCH] Bug 40817: Fix C3 MRO compilation errors in child classes Explicitly load parent classes before inheritance declarations to resolve C3 method resolution order errors that occurred during QA syntax checking. Modern::Perl enables C3 MRO by default, and the base pragma needs the parent class to be fully loaded before establishing inheritance. Adding explicit 'use Parent::Class;' statements before 'use base qw(Parent::Class);' ensures proper C3 linearization during compile-time checks. This resolves QA script failures while maintaining all existing functionality. --- Koha/Account/Debit.pm | 1 + Koha/Old/Hold.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/Koha/Account/Debit.pm b/Koha/Account/Debit.pm index a9df10be401..d92e8d100f4 100644 --- a/Koha/Account/Debit.pm +++ b/Koha/Account/Debit.pm @@ -19,6 +19,7 @@ package Koha::Account::Debit; use Modern::Perl; +use Koha::Account::Line; use base qw(Koha::Account::Line); =head1 NAME diff --git a/Koha/Old/Hold.pm b/Koha/Old/Hold.pm index fcb2348655e..b1497d7905c 100644 --- a/Koha/Old/Hold.pm +++ b/Koha/Old/Hold.pm @@ -19,6 +19,7 @@ package Koha::Old::Hold; use Modern::Perl; +use Koha::Hold; use base qw(Koha::Hold); use C4::Context; -- 2.53.0