Bug 24217: use Modern::Perl for modules when strict is missing

We absolutely need that for modules.
We are enabling strict by using Modern::Perl.
Note that other modules from C4 use strict and warnings, instead of
Modern::Perl

Test plan: git grep 2505 **/*.pm should not return any results

And let's see later what needs to be fixed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-12-11 13:02:07 +01:00 committed by Martin Renvoize
parent 65fb97389b
commit dc5fe323d2
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
28 changed files with 28 additions and 60 deletions

View File

@ -18,8 +18,7 @@ package C4::Accounts;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;
use C4::Stats;
use C4::Members;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use Carp;
use C4::Debug;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use MARC::Record;
=head1 NAME

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
=head1 NAME

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;
use C4::Auth qw/get_session/;
use Digest::MD5;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;
use Koha::Database;
use Koha::Patrons;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use DateTime;
use POSIX qw( floor );
use Koha::DateUtils;

View File

@ -18,8 +18,6 @@ package C4::Contract;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use strict;
#use warnings; FIXME - Bug 2505
use C4::Context;
use Koha::Database;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use Digest::MD5 qw(md5_base64);
use CGI::Session;
use File::Spec;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use File::Compare qw(compare);
use Cwd qw(cwd);
use File::Copy;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use vars qw(@ISA @EXPORT);
BEGIN {

View File

@ -20,8 +20,7 @@ package C4::Koha;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;
use Koha::Caches;

View File

@ -20,8 +20,7 @@ package C4::Members;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
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 );

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;

View File

@ -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 );

View File

@ -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 <http://www.gnu.org/licenses>.
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 );

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Context;
use vars qw(@ISA @EXPORT);

View File

@ -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 <http://www.gnu.org/licenses>.
#
#
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

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use CGI qw ( -utf8 );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);

View File

@ -21,8 +21,7 @@ package C4::Reserves;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use C4::Accounts;
use C4::Biblio;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use C4::Context;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
require Exporter;
use C4::Context;
use C4::Biblio; # GetMarcFromKohaField, GetBiblioData

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use LWP::UserAgent;
use URI;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
use CGI qw ( -utf8 );
use C4::Context;

View File

@ -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 <http://www.gnu.org/licenses>.
use strict;
#use warnings; FIXME - Bug 2505
use Modern::Perl;
require Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);

View File

@ -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 <http://www.gnu.org/licenses>.
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 {

View File

@ -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;

View File

@ -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);