From 051bdd026beb2ad06cb8ac7a10e3a246f2d35f20 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 23 Mar 2021 09:38:05 -0400 Subject: [PATCH] Bug 26351: Clean up includes in Circulation.pm Circulation.pm has so many includes that the same module is getting used multiple times without developers noticing it is already beuing used. This commit separates use lines by namespace and sorts them, removing duplicate and unnecessary use lines. --- C4/Circulation.pm | 75 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 5e5624dbf1..697c6cea6a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -19,64 +19,63 @@ package C4::Circulation; # along with Koha; if not, see . use Modern::Perl; + +use Algorithm::CheckDigits; +use Carp; +use Data::Dumper; +use Date::Calc qw( + Today + Today_and_Now + Add_Delta_YM + Add_Delta_DHMS + Date_to_Days + Day_of_Week + Add_Delta_Days +); use DateTime; +use Encode; +use List::MoreUtils qw( uniq any ); use POSIX qw( floor ); +use Scalar::Util qw( looks_like_number ); +use Try::Tiny; use YAML::XS; -use Encode; -use Koha::DateUtils; -use C4::Context; -use C4::Stats; -use C4::Reserves; +use C4::Accounts; use C4::Biblio; +use C4::Context; +use C4::Debug; +use C4::ItemCirculationAlertPreference; use C4::Items; +use C4::Log; # logaction use C4::Members; -use C4::Accounts; -use C4::ItemCirculationAlertPreference; use C4::Message; -use C4::Debug; -use C4::Log; # logaction use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); +use C4::Reserves; use C4::RotatingCollections qw(GetCollectionItemBranches); -use Algorithm::CheckDigits; +use C4::Stats; -use Data::Dumper; +use Koha::Account::Lines; +use Koha::Account::Offsets; use Koha::Account; use Koha::AuthorisedValues; use Koha::Biblioitems; -use Koha::DateUtils; use Koha::Calendar; +use Koha::Charges::Fees; +use Koha::Checkouts::ReturnClaims; use Koha::Checkouts; +use Koha::Config::SysPrefs; +use Koha::Database; +use Koha::DateUtils; +use Koha::Exceptions::Checkout; +use Koha::Holds; use Koha::Illrequests; use Koha::Items; -use Koha::Patrons; -use Koha::Patron::Debarments; -use Koha::Database; use Koha::Libraries; -use Koha::Account::Lines; -use Koha::Holds; -use Koha::Account::Lines; -use Koha::Account::Offsets; -use Koha::Config::SysPrefs; -use Koha::Charges::Fees; -use Koha::Config::SysPref; -use Koha::Checkouts::ReturnClaims; -use Koha::SearchEngine::Indexer; -use Koha::Exceptions::Checkout; +use Koha::Patron::Debarments; +use Koha::Patrons; use Koha::Plugins; -use Carp; -use List::MoreUtils qw( uniq any ); -use Scalar::Util qw( looks_like_number ); -use Try::Tiny; -use Date::Calc qw( - Today - Today_and_Now - Add_Delta_YM - Add_Delta_DHMS - Date_to_Days - Day_of_Week - Add_Delta_Days -); +use Koha::SearchEngine::Indexer; + use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); BEGIN { -- 2.24.1 (Apple Git-126)