Bugzilla – Attachment 77857 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.90 KB, created by
Jonathan Druart
on 2018-08-15 18:18:43 UTC
(
hide
)
Description:
Bug 19991: use Modern::Perl in OPAC perl scripts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-15 18:18:43 UTC
Size:
16.90 KB
patch
obsolete
>From 5964e822dcae4661498cc3bc6203b7886c118048 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 > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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 d2009c5b08..4ed8cc410f 100755 >--- a/opac/errors/400.pl >+++ b/opac/errors/400.pl >@@ -16,9 +16,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/errors/401.pl b/opac/errors/401.pl >index 2c1d60e06e..59e373f0cf 100755 >--- a/opac/errors/401.pl >+++ b/opac/errors/401.pl >@@ -16,9 +16,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/errors/402.pl b/opac/errors/402.pl >index 492495ea40..80256e790d 100755 >--- a/opac/errors/402.pl >+++ b/opac/errors/402.pl >@@ -16,9 +16,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/errors/403.pl b/opac/errors/403.pl >index 8e502bbd33..3ea0306d99 100755 >--- a/opac/errors/403.pl >+++ b/opac/errors/403.pl >@@ -16,9 +16,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/errors/404.pl b/opac/errors/404.pl >index 3a4e0443a5..5d2149507c 100755 >--- a/opac/errors/404.pl >+++ b/opac/errors/404.pl >@@ -16,9 +16,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/errors/500.pl b/opac/errors/500.pl >index 50fa33e1da..f129a32cdb 100755 >--- a/opac/errors/500.pl >+++ b/opac/errors/500.pl >@@ -16,9 +16,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-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index 64292d480d..76f6d21810 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 e8809e4f03..63de7d34d9 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 4dcb33c2e7..3ea2719412 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 438ef809ea..0f389a010e 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 b2e8a60dc8..519472f940 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 1fbf351ea8..4069ce78ca 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 0318aa09f7..7a94e81d52 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 8023d7deb5..09be474226 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 8189493197..8a6996ae18 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 8058394b9a..debeb30f6d 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 1c7a235706..e86cd43b34 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 fa28a697bc..31bbd0ccac 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 38d30b9dca..632d2c49ee 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 b5ae895947..177dfb777d 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 328506dd82..6c24e48420 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 50f9a23e6c..a6f0e6df6d 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 25675add0d..8620368b53 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 1951a2daee..38c50d6fd1 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 879a31ea61..49348adf45 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 676012ea6f..73606b0649 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 3c19e61ebf..a3b6663cc2 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 9fe6fc386a..b94935feee 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 a711b7fa3a..fc6dc6cac1 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 19493aae99..cf562fb97e 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 e5e182b685..b083ef20d7 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 c3a7530df8..fbf0081a38 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 94b0614f80..3e194c9338 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 2e6b58a1a9..30003e0feb 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 e94077dc2a..cd31be94c1 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 52d8e61316..a0ae29a70c 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 052a7b9d2a..9751f6343e 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 8ed08a2301..f4fb1d8722 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 9202683083..fb5ce0fcbd 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.11.0
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