Browse Source

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>
20.05.x
Jonathan Druart 2 years ago
committed by Martin Renvoize
parent
commit
dc5fe323d2
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 3
      C4/Accounts.pm
  2. 3
      C4/Auth_with_ldap.pm
  3. 3
      C4/AuthoritiesMarc/MARC21.pm
  4. 3
      C4/AuthoritiesMarc/UNIMARC.pm
  5. 3
      C4/BackgroundJob.pm
  6. 3
      C4/Budgets.pm
  7. 4
      C4/Circulation.pm
  8. 2
      C4/Contract.pm
  9. 3
      C4/InstallAuth.pm
  10. 3
      C4/Installer/UpgradeBackup.pm
  11. 3
      C4/Items.pm
  12. 3
      C4/Koha.pm
  13. 3
      C4/Members.pm
  14. 3
      C4/Members/AttributeTypes.pm
  15. 3
      C4/Output.pm
  16. 3
      C4/Overdues.pm
  17. 3
      C4/Print.pm
  18. 6
      C4/Record.pm
  19. 3
      C4/Reports.pm
  20. 3
      C4/Reserves.pm
  21. 3
      C4/Scheduler.pm
  22. 3
      C4/Search.pm
  23. 3
      C4/Search/PazPar2.pm
  24. 4
      C4/Suggestions.pm
  25. 3
      C4/TmplTokenType.pm
  26. 3
      C4/XISBN.pm
  27. 3
      misc/translator/TmplTokenizer.pm
  28. 3
      misc/translator/VerboseWarnings.pm

3
C4/Accounts.pm

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

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

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

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

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

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

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

2
C4/Contract.pm

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

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

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

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

3
C4/Koha.pm

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

3
C4/Members.pm

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

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

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

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

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

6
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 <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

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

3
C4/Reserves.pm

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

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

3
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 <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

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

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

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

3
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 <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 {

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

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

Loading…
Cancel
Save