From c7284a24142d4f0468386cea7237491ae98381e1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Dec 2019 13:02:07 +0100 Subject: [PATCH] Bug 24217: use Modern::Perl for modules We absolutely need that for modules. Test plan: git grep 2505 **/*.pm should not return any results And let's see later what needs to be fixed. --- C4/Accounts.pm | 3 +-- C4/Auth_with_ldap.pm | 3 +-- C4/AuthoritiesMarc/MARC21.pm | 3 +-- C4/AuthoritiesMarc/UNIMARC.pm | 3 +-- C4/BackgroundJob.pm | 3 +-- C4/Budgets.pm | 3 +-- C4/Circulation.pm | 4 +--- C4/Contract.pm | 2 -- C4/InstallAuth.pm | 3 +-- C4/Installer/UpgradeBackup.pm | 3 +-- C4/Items.pm | 3 +-- C4/Koha.pm | 3 +-- C4/Members.pm | 3 +-- C4/Members/AttributeTypes.pm | 3 +-- C4/Output.pm | 3 +-- C4/Overdues.pm | 3 +-- C4/Print.pm | 3 +-- C4/Record.pm | 6 ++---- C4/Reports.pm | 3 +-- C4/Reserves.pm | 3 +-- C4/Scheduler.pm | 3 +-- C4/Search.pm | 3 +-- C4/Search/PazPar2.pm | 3 +-- C4/Suggestions.pm | 4 +--- C4/TmplTokenType.pm | 3 +-- C4/XISBN.pm | 3 +-- misc/translator/TmplTokenizer.pm | 3 +-- misc/translator/VerboseWarnings.pm | 3 +-- 28 files changed, 28 insertions(+), 60 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 53fd8b77fa..92365eabf5 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -18,8 +18,7 @@ package C4::Accounts; # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use C4::Stats; use C4::Members; diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 09db190255..e861800c76 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -17,8 +17,7 @@ package C4::Auth_with_ldap; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use Carp; use C4::Debug; diff --git a/C4/AuthoritiesMarc/MARC21.pm b/C4/AuthoritiesMarc/MARC21.pm index 8ebae705fe..c704a68232 100644 --- a/C4/AuthoritiesMarc/MARC21.pm +++ b/C4/AuthoritiesMarc/MARC21.pm @@ -17,8 +17,7 @@ package C4::AuthoritiesMarc::MARC21; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use MARC::Record; =head1 NAME diff --git a/C4/AuthoritiesMarc/UNIMARC.pm b/C4/AuthoritiesMarc/UNIMARC.pm index 02c083e723..ebeaccc0d1 100644 --- a/C4/AuthoritiesMarc/UNIMARC.pm +++ b/C4/AuthoritiesMarc/UNIMARC.pm @@ -17,8 +17,7 @@ package C4::AuthoritiesMarc::UNIMARC; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; =head1 NAME diff --git a/C4/BackgroundJob.pm b/C4/BackgroundJob.pm index f607340f12..48683f9765 100644 --- a/C4/BackgroundJob.pm +++ b/C4/BackgroundJob.pm @@ -18,8 +18,7 @@ package C4::BackgroundJob; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use C4::Auth qw/get_session/; use Digest::MD5; diff --git a/C4/Budgets.pm b/C4/Budgets.pm index dfd442f070..387985ca76 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -17,8 +17,7 @@ package C4::Budgets; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use Koha::Database; use Koha::Patrons; diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 3568a32639..a62d60e4e6 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -18,9 +18,7 @@ package C4::Circulation; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . - -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use DateTime; use POSIX qw( floor ); use Koha::DateUtils; diff --git a/C4/Contract.pm b/C4/Contract.pm index 0de49ad361..13b9538e27 100644 --- a/C4/Contract.pm +++ b/C4/Contract.pm @@ -18,8 +18,6 @@ package C4::Contract; # along with Koha; if not, see . use Modern::Perl; -use strict; -#use warnings; FIXME - Bug 2505 use C4::Context; use Koha::Database; diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm index 67319b3db6..86d1241dff 100644 --- a/C4/InstallAuth.pm +++ b/C4/InstallAuth.pm @@ -17,8 +17,7 @@ package C4::InstallAuth; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use Digest::MD5 qw(md5_base64); use CGI::Session; use File::Spec; diff --git a/C4/Installer/UpgradeBackup.pm b/C4/Installer/UpgradeBackup.pm index 2e30c53676..2ca97b6693 100644 --- a/C4/Installer/UpgradeBackup.pm +++ b/C4/Installer/UpgradeBackup.pm @@ -17,8 +17,7 @@ package C4::Installer::UpgradeBackup; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use File::Compare qw(compare); use Cwd qw(cwd); use File::Copy; diff --git a/C4/Items.pm b/C4/Items.pm index b81fb0aa17..6bc2a41355 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -18,8 +18,7 @@ package C4::Items; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use vars qw(@ISA @EXPORT); BEGIN { diff --git a/C4/Koha.pm b/C4/Koha.pm index dd0a165a58..518c75776a 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -20,8 +20,7 @@ package C4::Koha; # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use Koha::Caches; diff --git a/C4/Members.pm b/C4/Members.pm index 6f2cb37562..eb5dbfb4e2 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -20,8 +20,7 @@ package C4::Members; # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use String::Random qw( random_string ); use Scalar::Util qw( looks_like_number ); diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm index bfd1494ee8..948acbe3a9 100644 --- a/C4/Members/AttributeTypes.pm +++ b/C4/Members/AttributeTypes.pm @@ -17,8 +17,7 @@ package C4::Members::AttributeTypes; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; diff --git a/C4/Output.pm b/C4/Output.pm index f8f8e13583..4549cfc1d4 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -25,8 +25,7 @@ package C4::Output; # NOTE: I'm pretty sure this module is deprecated in favor of # templates. -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use URI::Escape; use Scalar::Util qw( looks_like_number ); diff --git a/C4/Overdues.pm b/C4/Overdues.pm index 485f4dd598..2bf280cd06 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -19,8 +19,7 @@ package C4::Overdues; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use Date::Calc qw/Today Date_to_Days/; use Date::Manip qw/UnixDate/; use List::MoreUtils qw( uniq ); diff --git a/C4/Print.pm b/C4/Print.pm index d0f2642412..a5bd3d3381 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -17,8 +17,7 @@ package C4::Print; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Context; use vars qw(@ISA @EXPORT); diff --git a/C4/Record.pm b/C4/Record.pm index cde523f015..f54e368449 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -18,10 +18,8 @@ package C4::Record; # # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -# -# -use strict; -#use warnings; FIXME - Bug 2505 + +use Modern::Perl; # please specify in which methods a given module is used use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding diff --git a/C4/Reports.pm b/C4/Reports.pm index b89be52e87..a0aa718fea 100644 --- a/C4/Reports.pm +++ b/C4/Reports.pm @@ -17,8 +17,7 @@ package C4::Reports; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use CGI qw ( -utf8 ); use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 7a3785724a..5109296df9 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -21,8 +21,7 @@ package C4::Reserves; # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::Accounts; use C4::Biblio; diff --git a/C4/Scheduler.pm b/C4/Scheduler.pm index 304a05015d..a1c1ae557f 100644 --- a/C4/Scheduler.pm +++ b/C4/Scheduler.pm @@ -17,8 +17,7 @@ package C4::Scheduler; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use C4::Context; diff --git a/C4/Search.pm b/C4/Search.pm index c5704bcd53..94ddf60e4e 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -15,8 +15,7 @@ package C4::Search; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; require Exporter; use C4::Context; use C4::Biblio; # GetMarcFromKohaField, GetBiblioData diff --git a/C4/Search/PazPar2.pm b/C4/Search/PazPar2.pm index fed5c2c551..a1682930d0 100644 --- a/C4/Search/PazPar2.pm +++ b/C4/Search/PazPar2.pm @@ -17,8 +17,7 @@ package C4::Search::PazPar2; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use LWP::UserAgent; use URI; diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 764c331752..59c5703d9f 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -18,9 +18,7 @@ package C4::Suggestions; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; - -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; diff --git a/C4/TmplTokenType.pm b/C4/TmplTokenType.pm index b2ebac8529..c8a5c96e89 100644 --- a/C4/TmplTokenType.pm +++ b/C4/TmplTokenType.pm @@ -17,8 +17,7 @@ package C4::TmplTokenType; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; require Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); diff --git a/C4/XISBN.pm b/C4/XISBN.pm index 1b3a3bbbd6..c28cc340b6 100644 --- a/C4/XISBN.pm +++ b/C4/XISBN.pm @@ -17,6 +17,7 @@ package C4::XISBN; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . +use Modern::Perl; use XML::Simple; #use LWP::Simple; use C4::Biblio; @@ -30,8 +31,6 @@ use Koha::Biblios; use Koha::SearchEngine; use Koha::SearchEngine::Search; -use strict; -#use warnings; FIXME - Bug 2505 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); BEGIN { diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index 98f322c502..b092ba61d7 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -1,7 +1,6 @@ package TmplTokenizer; -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use C4::TmplTokenType; use C4::TmplToken; use C4::TTParser; diff --git a/misc/translator/VerboseWarnings.pm b/misc/translator/VerboseWarnings.pm index 8fac8ba680..08ee09c22e 100644 --- a/misc/translator/VerboseWarnings.pm +++ b/misc/translator/VerboseWarnings.pm @@ -1,7 +1,6 @@ package VerboseWarnings; -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; require Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); -- 2.11.0