Bugzilla – Attachment 70644 Details for
Bug 19991
use Modern::Perl in OPAC perl scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19991: use Modern::Perl in OPAC perl scripts
Bug-19991-use-ModernPerl-in-OPAC-perl-scripts.patch (text/plain), 16.48 KB, created by
Charlotte Cordwell
on 2018-01-17 20:49:57 UTC
(
hide
)
Description:
Bug 19991: use Modern::Perl in OPAC perl scripts
Filename:
MIME Type:
Creator:
Charlotte Cordwell
Created:
2018-01-17 20:49:57 UTC
Size:
16.48 KB
patch
obsolete
>From 1146cf5d8412bec179d9d88cd5afba95e27bfb4b Mon Sep 17 00:00:00 2001 >From: Charlotte Cordwell <charlotte.cordwell123@gmail.com> >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 >--- > errors/400.pl | 3 +-- > errors/401.pl | 4 ++-- > errors/402.pl | 3 +-- > errors/403.pl | 3 +-- > errors/404.pl | 3 +-- > errors/500.pl | 3 +-- > 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, 41 insertions(+), 78 deletions(-) > >diff --git a/errors/400.pl b/errors/400.pl >index 7c947db..2bfe3b8 100755 >--- a/errors/400.pl >+++ b/errors/400.pl >@@ -16,8 +16,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > >-use strict; >-use warnings; >+use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >diff --git a/errors/401.pl b/errors/401.pl >index fcd2d88..a01954e 100755 >--- a/errors/401.pl >+++ b/errors/401.pl >@@ -15,8 +15,8 @@ > # 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 Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >diff --git a/errors/402.pl b/errors/402.pl >index 1a9f3a6..b9431c4 100755 >--- a/errors/402.pl >+++ b/errors/402.pl >@@ -16,8 +16,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > >-use strict; >-use warnings; >+use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >diff --git a/errors/403.pl b/errors/403.pl >index 3a46f68..78f4f08 100755 >--- a/errors/403.pl >+++ b/errors/403.pl >@@ -16,8 +16,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > >-use strict; >-use warnings; >+use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >diff --git a/errors/404.pl b/errors/404.pl >index 57191f1..e5870ad 100755 >--- a/errors/404.pl >+++ b/errors/404.pl >@@ -16,8 +16,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > >-use strict; >-use warnings; >+use Modern::Perl; > use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; >diff --git a/errors/500.pl b/errors/500.pl >index 0008faf..f3f73ba 100755 >--- a/errors/500.pl >+++ b/errors/500.pl >@@ -16,8 +16,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > >-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 6ed153d..a389e4d 100755 >--- a/opac/opac-alert-subscribe.pl >+++ b/opac/opac-alert-subscribe.pl >@@ -18,9 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > >-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 <http://www.gnu.org/licenses>. > >-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 c4da67e..b188afd 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 <http://www.gnu.org/licenses>. > >-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 906d56f..f7e1bde 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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 3c10fde..073c376 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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 ff0d328..3686486 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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > > >-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 <http://www.gnu.org/licenses>. > > >-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 <http://www.gnu.org/licenses>. > >-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 f6d7aa8..55da385 100755 >--- a/opac/opac-serial-issues.pl >+++ b/opac/opac-serial-issues.pl >@@ -18,8 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > >-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 <http://www.gnu.org/licenses>. > >-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 e086b14..293c64b 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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-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 55c04a3..514b9be 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -17,8 +17,7 @@ > # 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 ); > >diff --git a/opac/sco/help.pl b/opac/sco/help.pl >index 412dc40..b4aff1f 100755 >--- a/opac/sco/help.pl >+++ b/opac/sco/help.pl >@@ -21,8 +21,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > >-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 dc6fbc8..7ecbe23 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 <http://www.gnu.org/licenses>. > >-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 <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >+use Modern::Perl; > > =head1 NAME > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19991
:
70644
|
77545
|
77716
|
77857
|
77858