From 69513449dbfd08f53d6c1b78792c87478481437c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Jul 2022 16:23:25 +0200 Subject: [PATCH] Bug 29951: Fix EXPORT for C4::ClassS*Routine modules Can't locate object method "subclasses" via package "C4::ClassSplitRoutine" at /kohadevbox/koha/C4/ClassSplitRoutine.pm line 53 Certainly from bug 17600. Test plan: Home -> Administration -> Classification sources -> New splitting rule And create classification sources and filing rules. Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- C4/ClassSortRoutine.pm | 8 +++----- C4/ClassSource.pm | 6 ++---- C4/ClassSplitRoutine.pm | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/C4/ClassSortRoutine.pm b/C4/ClassSortRoutine.pm index 248baa74a8..dc530790b2 100644 --- a/C4/ClassSortRoutine.pm +++ b/C4/ClassSortRoutine.pm @@ -1,7 +1,7 @@ package C4::ClassSortRoutine; -# Copyright (C) 2007 LibLime -# +# Copyright 2022 Koha Development Team +# # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it @@ -17,11 +17,9 @@ package C4::ClassSortRoutine; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use Class::Factory::Util; -use C4::Context; our (@ISA, @EXPORT_OK); BEGIN { diff --git a/C4/ClassSource.pm b/C4/ClassSource.pm index e9487912e9..6ee5fc8806 100644 --- a/C4/ClassSource.pm +++ b/C4/ClassSource.pm @@ -1,7 +1,6 @@ package C4::ClassSource; -# Copyright (C) 2007 LibLime -# +# Copyright 2022 Koha Development Team # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it @@ -17,8 +16,7 @@ package C4::ClassSource; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use C4::Context; use C4::ClassSortRoutine qw( GetClassSortKey ); diff --git a/C4/ClassSplitRoutine.pm b/C4/ClassSplitRoutine.pm index ed6f665170..2da560d71c 100644 --- a/C4/ClassSplitRoutine.pm +++ b/C4/ClassSplitRoutine.pm @@ -1,6 +1,6 @@ package C4::ClassSplitRoutine; -# Copyright 2018 Koha Development Team +# Copyright 2022 Koha Development Team # # This file is part of Koha. # @@ -19,10 +19,16 @@ package C4::ClassSplitRoutine; use Modern::Perl; -require Exporter; - -use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); +use Class::Factory::Util; +our (@ISA, @EXPORT_OK); +BEGIN { + require Exporter; + @ISA = qw(Exporter); + @EXPORT_OK = qw( + GetSplitRoutineNames + ); +} =head1 NAME @@ -36,11 +42,6 @@ use C4::ClassSplitRoutine; =cut -@ISA = qw(Exporter); -@EXPORT = qw( - GetSplitRoutineNames -); - =head2 GetSplitRoutineNames my @routines = GetSplitRoutineNames(); -- 2.39.5