[Koha-patches] [PATCH] Bug 2505 - remove unnecessary -w and replace with use warnings;
Chris Cormack
chrisc at catalyst.net.nz
Wed Feb 24 01:33:02 CET 2010
From: Donovan Jones <donovan at catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
installer/externalmodules.pl | 3 ++-
misc/cronjobs/advance_notices.pl | 2 +-
misc/cronjobs/cleanup_database.pl | 2 +-
misc/cronjobs/create_koc_db.pl | 2 +-
misc/cronjobs/longoverdue.pl | 2 +-
misc/cronjobs/overdue_notices.pl | 2 +-
misc/cronjobs/process_message_queue.pl | 2 +-
misc/cronjobs/runreport.pl | 2 +-
misc/cronjobs/serialsUpdate.pl | 2 +-
.../stats/monthly_circulation_statistics.pl | 3 ++-
.../cronjobs/stats/monthly_new_items_statistics.pl | 4 +++-
.../stats/monthly_new_patron_statistics.pl | 3 ++-
misc/maintenance/fix_accountlines_date.pl | 3 ++-
misc/perlmodule_rm.pl | 5 ++++-
misc/spellcheck_suggest/make_spellcheck_suggest.pl | 4 +++-
15 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/installer/externalmodules.pl b/installer/externalmodules.pl
index 4be9965..42eb4b7 100755
--- a/installer/externalmodules.pl
+++ b/installer/externalmodules.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# This Script can be used to provide a list of ALL external modules ***used*** (uncommented) in Koha.
# It provides you not only the list of modules BUT ALSO the files that uses those modules.
@@ -6,6 +6,7 @@
use strict;
+use warnings;
use C4::Context;
my $dir=C4::Context->config('intranetdir');
qx(grep -r "^ *use" $dir | grep -v "C4\|strict\|vars" >/tmp/modulesKoha.log);
diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl
index e365b61..1e7ce7b 100755
--- a/misc/cronjobs/advance_notices.pl
+++ b/misc/cronjobs/advance_notices.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2008 LibLime
#
diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl
index 47b9c26..a1a4c11 100755
--- a/misc/cronjobs/cleanup_database.pl
+++ b/misc/cronjobs/cleanup_database.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2009 PTFS, Inc.
#
diff --git a/misc/cronjobs/create_koc_db.pl b/misc/cronjobs/create_koc_db.pl
index a38e764..ccc4a5b 100755
--- a/misc/cronjobs/create_koc_db.pl
+++ b/misc/cronjobs/create_koc_db.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# 2008 Kyle Hall <kyle.m.hall at gmail.com>
diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl
index ee0c8e9..d9a18be 100755
--- a/misc/cronjobs/longoverdue.pl
+++ b/misc/cronjobs/longoverdue.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#-----------------------------------
# Copyright 2008 LibLime
#
diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index a2f94a2..d9a5a56 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2008 Liblime
#
diff --git a/misc/cronjobs/process_message_queue.pl b/misc/cronjobs/process_message_queue.pl
index af9b1b3..3eeaa84 100755
--- a/misc/cronjobs/process_message_queue.pl
+++ b/misc/cronjobs/process_message_queue.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2008 LibLime
#
diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl
index b2e4af9..9a470f4 100755
--- a/misc/cronjobs/runreport.pl
+++ b/misc/cronjobs/runreport.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# Copyright 2008 Liblime
#
diff --git a/misc/cronjobs/serialsUpdate.pl b/misc/cronjobs/serialsUpdate.pl
index 451c395..77e9a3c 100755
--- a/misc/cronjobs/serialsUpdate.pl
+++ b/misc/cronjobs/serialsUpdate.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright 2008 SARL Biblibre
#
diff --git a/misc/cronjobs/stats/monthly_circulation_statistics.pl b/misc/cronjobs/stats/monthly_circulation_statistics.pl
index 57d273b..1d8ab9f 100755
--- a/misc/cronjobs/stats/monthly_circulation_statistics.pl
+++ b/misc/cronjobs/stats/monthly_circulation_statistics.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#-----------------------------------
# Script Name: circstats.pl
# Script Version: 1.0
@@ -30,6 +30,7 @@
# Suite 330, Boston, MA 02111-1307 USA
# use strict;
+use warnings;
# UNCOMMENT the following lines if running from a command line
# print "THIS SCRIPT produces a comma-separated values file of circulation statistics for a given month and year.\n\nDo you wish to continue? (y/n) ";
diff --git a/misc/cronjobs/stats/monthly_new_items_statistics.pl b/misc/cronjobs/stats/monthly_new_items_statistics.pl
index 746cbb8..d5df701 100755
--- a/misc/cronjobs/stats/monthly_new_items_statistics.pl
+++ b/misc/cronjobs/stats/monthly_new_items_statistics.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#-----------------------------------
# Script Name: addstats.pl
# Script Version: 1.0
@@ -29,6 +29,8 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
+use warnings;
+
# UNCOMMENT the following lines if running from a command line
# print "THIS SCRIPT produces a comma-separated values file of circulation statistics for a given month and year.\n\nDo you wish to continue? (y/n) ";
# chomp($_ = <STDIN>);
diff --git a/misc/cronjobs/stats/monthly_new_patron_statistics.pl b/misc/cronjobs/stats/monthly_new_patron_statistics.pl
index 7b5cbdf..2ef2a14 100755
--- a/misc/cronjobs/stats/monthly_new_patron_statistics.pl
+++ b/misc/cronjobs/stats/monthly_new_patron_statistics.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#-----------------------------------
# Script Name: borrstats.pl
# Script Version: 1.0
@@ -30,6 +30,7 @@
# Suite 330, Boston, MA 02111-1307 USA
# use strict;
+use warnings;
# UNCOMMENT the following lines if running from a command line
# print "THIS SCRIPT produces a comma-separated values file of circulation statistics for a given month and year.\n\nDo you wish to continue? (y/n) ";
diff --git a/misc/maintenance/fix_accountlines_date.pl b/misc/maintenance/fix_accountlines_date.pl
index 4f95e90..2cb98d4 100755
--- a/misc/maintenance/fix_accountlines_date.pl
+++ b/misc/maintenance/fix_accountlines_date.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# Copyright (C) 2008 LibLime
#
@@ -18,6 +18,7 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
diff --git a/misc/perlmodule_rm.pl b/misc/perlmodule_rm.pl
index 82e34c6..4dc3b64 100755
--- a/misc/perlmodule_rm.pl
+++ b/misc/perlmodule_rm.pl
@@ -1,5 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
# Remove a perl module
+
+use warnings;
use ExtUtils::Packlist;
use ExtUtils::Installed;
diff --git a/misc/spellcheck_suggest/make_spellcheck_suggest.pl b/misc/spellcheck_suggest/make_spellcheck_suggest.pl
index 097e792..1b81a2b 100755
--- a/misc/spellcheck_suggest/make_spellcheck_suggest.pl
+++ b/misc/spellcheck_suggest/make_spellcheck_suggest.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
## This Script creates a Koha suggest and spellcheck database
## for those features as visible on LibLime's opac: opac.liblime.com
## It also contains the needed specs for creating a table of
@@ -14,6 +14,8 @@
## TODO: add suggest features, merge the two of them?
## There are a few configurable variables.
+use warnings;
+
## CONFIGURABLE VARIABLES ####################
##
# These are the tags that have meaningful data
--
1.6.3.3
More information about the Koha-patches
mailing list