From 9f3d18d43e3fe4e6987fb4dd09a8760560372dbf Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 13 Aug 2014 12:43:11 +0200 Subject: Bug 996893: Perl 5.18 and newer throw tons of warnings about deprecated modules r=dkl a=sgreen --- contrib/Bugzilla.pm | 1 + contrib/bz_webservice_demo.pl | 5 ++++- contrib/bzdbcopy.pl | 5 ++++- contrib/console.pl | 6 ++++-- contrib/convert-workflow.pl | 5 ++++- contrib/extension-convert.pl | 8 +++++++- contrib/fixperms.pl | 4 +++- contrib/merge-users.pl | 4 +++- contrib/mysqld-watcher.pl | 4 +++- contrib/recode.pl | 5 ++++- contrib/sendbugmail.pl | 4 +++- contrib/sendunsentbugmail.pl | 4 +++- contrib/syncLDAP.pl | 4 +++- 13 files changed, 46 insertions(+), 13 deletions(-) (limited to 'contrib') diff --git a/contrib/Bugzilla.pm b/contrib/Bugzilla.pm index fbae60de4..31e0a0f6d 100644 --- a/contrib/Bugzilla.pm +++ b/contrib/Bugzilla.pm @@ -6,6 +6,7 @@ package Bugzilla; use 5.10.1; use strict; +use warnings; ####################################################################### # The goal of this tiny module is to let Bugzilla packagers of # diff --git a/contrib/bz_webservice_demo.pl b/contrib/bz_webservice_demo.pl index 8850d642a..af8c25308 100755 --- a/contrib/bz_webservice_demo.pl +++ b/contrib/bz_webservice_demo.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -18,7 +18,10 @@ C for detailed help =cut +use 5.10.1; use strict; +use warnings; + use lib qw(lib); use Getopt::Long; use Pod::Usage; diff --git a/contrib/bzdbcopy.pl b/contrib/bzdbcopy.pl index f50002e85..fcdbefd56 100755 --- a/contrib/bzdbcopy.pl +++ b/contrib/bzdbcopy.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,7 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. +use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/contrib/console.pl b/contrib/console.pl index dbd514ebd..fe2342cd9 100755 --- a/contrib/console.pl +++ b/contrib/console.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,6 +6,8 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. +use warnings; + use File::Basename; BEGIN { chdir dirname($0) . "/.."; } use lib qw(. lib); @@ -51,7 +53,7 @@ sub d { # p: print as a single string (normal behavior puts list items on separate lines) sub p { - local $^W=0; # suppress possible undefined var message + no warnings; # suppress possible undefined var message print(@_, "\n"); return (); } diff --git a/contrib/convert-workflow.pl b/contrib/convert-workflow.pl index 8f76dac7f..d9bffb7bb 100755 --- a/contrib/convert-workflow.pl +++ b/contrib/convert-workflow.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,7 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. +use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/contrib/extension-convert.pl b/contrib/extension-convert.pl index 4e24b614a..91a77b839 100755 --- a/contrib/extension-convert.pl +++ b/contrib/extension-convert.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -6,8 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. +use 5.10.1; use strict; use warnings; + use lib qw(. lib); use Bugzilla; @@ -68,6 +70,8 @@ my ($modules, $subs) = code_files_to_subroutines($to_dir); my $config_pm = < '$extension_name'; $install_requirements __PACKAGE__->NAME; @@ -76,6 +80,8 @@ END my $extension_pm = <