From 4a2fc5c6df5afe989b1d2a23258d5e53de623425 Mon Sep 17 00:00:00 2001 From: Charlotte Cordwell Date: Wed, 17 Jan 2018 20:46:59 +0000 Subject: [PATCH] Bug 19991: use Modern::Perl in OPAC perl scripts Test Case: Check the following files have been updated from use strict; use warnings; to use Modern::Perl; errors/400.pl errors/401.pl errors/402.pl errors/403.pl errors/404.pl errors/500.pl opac-account-pay-paypal-return.pl opac-alert-subscribe.pl opac-authorities-home.pl opac-authoritiesdetail.pl opac-browser.pl opac-ics.pl opac-image.pl opac-imageviewer.pl opac-messaging.pl opac-modrequest-suspend.pl opac-modrequest.pl opac-mymessages.pl opac-overdrive-search.pl opac-passwd.pl opac-patron-image.pl opac-privacy.pl opac-ratings-ajax.pl opac-ratings.pl opac-readingrecord.pl opac-renew.pl opac-sendshelf.pl opac-serial-issues.pl opac-showreviews.pl opac-suggestions.pl opac-tags_subject.pl opac-topissues.pl opac-user.pl sco/help.pl sco/printslip.pl sco/sco-patron-image.pl svc/overdrive_proxy svc/suggestion unapi --- opac/errors/400.pl | 4 +--- opac/errors/401.pl | 4 +--- opac/errors/402.pl | 4 +--- opac/errors/403.pl | 4 +--- opac/errors/404.pl | 4 +--- opac/errors/500.pl | 4 +--- opac/opac-account-pay-paypal-return.pl | 3 +-- opac/opac-alert-subscribe.pl | 4 +--- opac/opac-authorities-home.pl | 3 +-- opac/opac-authoritiesdetail.pl | 3 +-- opac/opac-browser.pl | 3 +-- opac/opac-ics.pl | 3 +-- opac/opac-image.pl | 3 +-- opac/opac-imageviewer.pl | 3 +-- opac/opac-messaging.pl | 3 +-- opac/opac-modrequest-suspend.pl | 3 +-- opac/opac-modrequest.pl | 3 +-- opac/opac-mymessages.pl | 3 +-- opac/opac-overdrive-search.pl | 3 +-- opac/opac-passwd.pl | 3 +-- opac/opac-patron-image.pl | 3 +-- opac/opac-privacy.pl | 2 +- opac/opac-ratings-ajax.pl | 3 +-- opac/opac-ratings.pl | 3 +-- opac/opac-readingrecord.pl | 3 +-- opac/opac-renew.pl | 3 +-- opac/opac-sendshelf.pl | 3 +-- opac/opac-serial-issues.pl | 3 +-- opac/opac-showreviews.pl | 3 +-- opac/opac-suggestions.pl | 4 ++-- opac/opac-tags_subject.pl | 3 +-- opac/opac-topissues.pl | 3 +-- opac/opac-user.pl | 3 +-- opac/sco/help.pl | 3 +-- opac/sco/printslip.pl | 3 +-- opac/sco/sco-patron-image.pl | 3 +-- opac/svc/overdrive_proxy | 3 +-- opac/svc/suggestion | 3 +-- opac/unapi | 3 +-- 39 files changed, 40 insertions(+), 84 deletions(-) diff --git a/opac/errors/400.pl b/opac/errors/400.pl index d2009c5..4ed8cc4 100755 --- a/opac/errors/400.pl +++ b/opac/errors/400.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/errors/401.pl b/opac/errors/401.pl index 2c1d60e..59e373f 100755 --- a/opac/errors/401.pl +++ b/opac/errors/401.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/errors/402.pl b/opac/errors/402.pl index 492495e..80256e7 100755 --- a/opac/errors/402.pl +++ b/opac/errors/402.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/errors/403.pl b/opac/errors/403.pl index 8e502bb..3ea0306 100755 --- a/opac/errors/403.pl +++ b/opac/errors/403.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/errors/404.pl b/opac/errors/404.pl index 3a4e044..5d21495 100755 --- a/opac/errors/404.pl +++ b/opac/errors/404.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/errors/500.pl b/opac/errors/500.pl index 50fa33e..f129a32 100755 --- a/opac/errors/500.pl +++ b/opac/errors/500.pl @@ -16,9 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl index 64292d4..76f6d21 100755 --- a/opac/opac-account-pay-paypal-return.pl +++ b/opac/opac-account-pay-paypal-return.pl @@ -17,8 +17,7 @@ # with Koha; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -use strict; -use warnings; +use Modern::Perl; use utf8; use CGI; diff --git a/opac/opac-alert-subscribe.pl b/opac/opac-alert-subscribe.pl index e8809e4..63de7d3 100755 --- a/opac/opac-alert-subscribe.pl +++ b/opac/opac-alert-subscribe.pl @@ -18,9 +18,7 @@ # along with Koha; if not, see . -use strict; -use warnings; - +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 4dcb33c..3ea2719 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -18,8 +18,7 @@ # 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 CGI qw ( -utf8 ); use URI::Escape; diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl index 438ef80..0f389a0 100755 --- a/opac/opac-authoritiesdetail.pl +++ b/opac/opac-authoritiesdetail.pl @@ -36,8 +36,7 @@ parameters tables. =cut -use strict; -use warnings; +use Modern::Perl; use C4::AuthoritiesMarc; use C4::Auth; diff --git a/opac/opac-browser.pl b/opac/opac-browser.pl index b2e8a60..519472f 100755 --- a/opac/opac-browser.pl +++ b/opac/opac-browser.pl @@ -24,8 +24,7 @@ TODO :: Description here =cut -use strict; -use warnings; +use Modern::Perl; use C4::Auth; use C4::Context; diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl index 1fbf351..4069ce7 100755 --- a/opac/opac-ics.pl +++ b/opac/opac-ics.pl @@ -19,8 +19,7 @@ # This script builds an ICalendar file (rfc 2445) for use in programs such as Ical -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use Data::ICal; diff --git a/opac/opac-image.pl b/opac/opac-image.pl index 0318aa0..7a94e81 100755 --- a/opac/opac-image.pl +++ b/opac/opac-image.pl @@ -23,8 +23,7 @@ # # -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; diff --git a/opac/opac-imageviewer.pl b/opac/opac-imageviewer.pl index 8023d7d..09be474 100755 --- a/opac/opac-imageviewer.pl +++ b/opac/opac-imageviewer.pl @@ -17,8 +17,7 @@ # 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 CGI qw ( -utf8 ); use C4::Auth; diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index d2c4033..1b3c151 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -17,8 +17,7 @@ # 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 CGI qw ( -utf8 ); diff --git a/opac/opac-modrequest-suspend.pl b/opac/opac-modrequest-suspend.pl index 8058394..debeb30 100755 --- a/opac/opac-modrequest-suspend.pl +++ b/opac/opac-modrequest-suspend.pl @@ -15,8 +15,7 @@ # 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 CGI qw ( -utf8 ); use C4::Output; diff --git a/opac/opac-modrequest.pl b/opac/opac-modrequest.pl index 1c7a235..e86cd43 100755 --- a/opac/opac-modrequest.pl +++ b/opac/opac-modrequest.pl @@ -22,8 +22,7 @@ # 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 CGI qw ( -utf8 ); use C4::Output; diff --git a/opac/opac-mymessages.pl b/opac/opac-mymessages.pl index fa28a69..31bbd0c 100755 --- a/opac/opac-mymessages.pl +++ b/opac/opac-mymessages.pl @@ -17,8 +17,7 @@ # 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 CGI qw ( -utf8 ); diff --git a/opac/opac-overdrive-search.pl b/opac/opac-overdrive-search.pl index 38d30b9..632d2c4 100755 --- a/opac/opac-overdrive-search.pl +++ b/opac/opac-overdrive-search.pl @@ -17,8 +17,7 @@ # 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 CGI qw ( -utf8 ); diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl index b5ae895..177dfb7 100755 --- a/opac/opac-passwd.pl +++ b/opac/opac-passwd.pl @@ -18,8 +18,7 @@ # 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 CGI qw ( -utf8 ); diff --git a/opac/opac-patron-image.pl b/opac/opac-patron-image.pl index 328506d..6c24e48 100755 --- a/opac/opac-patron-image.pl +++ b/opac/opac-patron-image.pl @@ -18,8 +18,7 @@ # 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::Members; use CGI qw ( -utf8 ); use CGI::Cookie; # need to check cookies before having CGI parse the POST request diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl index 50f9a23..a6f0e6d 100755 --- a/opac/opac-privacy.pl +++ b/opac/opac-privacy.pl @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; # checkauth, getborrowernumber. diff --git a/opac/opac-ratings-ajax.pl b/opac/opac-ratings-ajax.pl index 25675ad..8620368 100755 --- a/opac/opac-ratings-ajax.pl +++ b/opac/opac-ratings-ajax.pl @@ -23,8 +23,7 @@ A script that takes an ajax json query, and then inserts or modifies a star-rati =cut -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use CGI::Cookie; # need to check cookies before having CGI parse the POST request diff --git a/opac/opac-ratings.pl b/opac/opac-ratings.pl index 1951a2d..38c50d6 100755 --- a/opac/opac-ratings.pl +++ b/opac/opac-ratings.pl @@ -25,8 +25,7 @@ note: there is currently no 'delete rating' functionality in this script =cut -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 879a31e..49348ad 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -16,8 +16,7 @@ # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl index 676012e..73606b0 100755 --- a/opac/opac-renew.pl +++ b/opac/opac-renew.pl @@ -21,8 +21,7 @@ # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Circulation; diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index 3c19e61..a3b6663 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -17,8 +17,7 @@ # 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 CGI qw ( -utf8 ); use Encode qw( encode ); diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl index 9fe6fc3..b94935f 100755 --- a/opac/opac-serial-issues.pl +++ b/opac/opac-serial-issues.pl @@ -18,8 +18,7 @@ # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index a711b7f..fc6dc6c 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -18,8 +18,7 @@ # 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 CGI qw ( -utf8 ); use C4::Auth; diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 19493aa..cf562fb 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -15,8 +15,8 @@ # 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 CGI qw ( -utf8 ); use Encode qw( encode ); diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl index e5e182b..b083ef2 100755 --- a/opac/opac-tags_subject.pl +++ b/opac/opac-tags_subject.pl @@ -24,8 +24,7 @@ TODO :: Description here =cut -use strict; -use warnings; +use Modern::Perl; use C4::Auth; use C4::Context; diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index c3a7530..fbf0081 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -19,8 +19,7 @@ # 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 CGI qw ( -utf8 ); use C4::Auth; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 78bd30b..bbd3127 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -17,8 +17,7 @@ # along with Koha; if not, see . -use strict; -#use warnings; FIXME - Bug 2505 +use Modern::Perl; use CGI qw ( -utf8 ); diff --git a/opac/sco/help.pl b/opac/sco/help.pl index 2e6b58a..30003e0 100755 --- a/opac/sco/help.pl +++ b/opac/sco/help.pl @@ -21,8 +21,7 @@ # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw(get_template_and_user); diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl index e94077d..cd31be9 100755 --- a/opac/sco/printslip.pl +++ b/opac/sco/printslip.pl @@ -26,8 +26,7 @@ It is called from sco-main.pl =cut -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw/:DEFAULT get_session/; diff --git a/opac/sco/sco-patron-image.pl b/opac/sco/sco-patron-image.pl index 52d8e61..a0ae29a 100755 --- a/opac/sco/sco-patron-image.pl +++ b/opac/sco/sco-patron-image.pl @@ -17,8 +17,7 @@ # 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::Service; use C4::Members; use Koha::Patron::Images; diff --git a/opac/svc/overdrive_proxy b/opac/svc/overdrive_proxy index 052a7b9..9751f63 100755 --- a/opac/svc/overdrive_proxy +++ b/opac/svc/overdrive_proxy @@ -32,8 +32,7 @@ JS side from having to deal with cross-origin/authentication issues. =cut -use strict; -use warnings; +use Modern::Perl; use CGI qw(-oldstyle_urls -utf8); use JSON; diff --git a/opac/svc/suggestion b/opac/svc/suggestion index 8ed08a2..f4fb1d8 100755 --- a/opac/svc/suggestion +++ b/opac/svc/suggestion @@ -51,8 +51,7 @@ Number of suggestions to display. Defaults to 4 in stub mode, 20 otherwise. =cut -use strict; -use warnings; +use Modern::Perl; use C4::Auth; use C4::Context; diff --git a/opac/unapi b/opac/unapi index 9202683..fb5ce0f 100755 --- a/opac/unapi +++ b/opac/unapi @@ -17,8 +17,7 @@ # 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; =head1 NAME -- 2.1.4