diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2014-08-13 12:43:11 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2014-08-13 12:43:11 +0200 |
commit | 9f3d18d43e3fe4e6987fb4dd09a8760560372dbf (patch) | |
tree | bf64b06312ad9d2a4f590c414ecc28c4f8e20054 | |
parent | Bug 993926: Bugzilla::User::Setting::get_all_settings() should use memcached (diff) | |
download | bugzilla-9f3d18d43e3fe4e6987fb4dd09a8760560372dbf.tar.gz bugzilla-9f3d18d43e3fe4e6987fb4dd09a8760560372dbf.tar.bz2 bugzilla-9f3d18d43e3fe4e6987fb4dd09a8760560372dbf.zip |
Bug 996893: Perl 5.18 and newer throw tons of warnings about deprecated modules
r=dkl a=sgreen
266 files changed, 565 insertions, 189 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 271bd894b..24ce65c2e 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -9,6 +9,7 @@ package Bugzilla; use 5.10.1; use strict; +use warnings; # We want any compile errors to get to the browser, if possible. BEGIN { diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 19c10c8fe..b44c94cd0 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -9,6 +9,7 @@ package Bugzilla::Attachment; use 5.10.1; use strict; +use warnings; =head1 NAME diff --git a/Bugzilla/Attachment/PatchReader.pm b/Bugzilla/Attachment/PatchReader.pm index c2ef53a65..aa4df7294 100644 --- a/Bugzilla/Attachment/PatchReader.pm +++ b/Bugzilla/Attachment/PatchReader.pm @@ -9,6 +9,7 @@ package Bugzilla::Attachment::PatchReader; use 5.10.1; use strict; +use warnings; use Config; use IO::Select; diff --git a/Bugzilla/Auth.pm b/Bugzilla/Auth.pm index 5d4c348da..96d4ee883 100644 --- a/Bugzilla/Auth.pm +++ b/Bugzilla/Auth.pm @@ -9,6 +9,8 @@ package Bugzilla::Auth; use 5.10.1; use strict; +use warnings; + use fields qw( _info_getter _verifier diff --git a/Bugzilla/Auth/Login.pm b/Bugzilla/Auth/Login.pm index 33d63a425..a5f089777 100644 --- a/Bugzilla/Auth/Login.pm +++ b/Bugzilla/Auth/Login.pm @@ -9,6 +9,8 @@ package Bugzilla::Auth::Login; use 5.10.1; use strict; +use warnings; + use fields qw(); # Determines whether or not a user can logout. It's really a subroutine, diff --git a/Bugzilla/Auth/Login/APIKey.pm b/Bugzilla/Auth/Login/APIKey.pm index 902ce4da7..63e35578a 100644 --- a/Bugzilla/Auth/Login/APIKey.pm +++ b/Bugzilla/Auth/Login/APIKey.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Login::APIKey; use 5.10.1; use strict; +use warnings; use base qw(Bugzilla::Auth::Login); diff --git a/Bugzilla/Auth/Login/CGI.pm b/Bugzilla/Auth/Login/CGI.pm index 76b82804a..6003d62a5 100644 --- a/Bugzilla/Auth/Login/CGI.pm +++ b/Bugzilla/Auth/Login/CGI.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Login::CGI; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Auth::Login); use constant user_can_create_account => 1; diff --git a/Bugzilla/Auth/Login/Cookie.pm b/Bugzilla/Auth/Login/Cookie.pm index e3ba98183..c09f08d24 100644 --- a/Bugzilla/Auth/Login/Cookie.pm +++ b/Bugzilla/Auth/Login/Cookie.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Login::Cookie; use 5.10.1; use strict; +use warnings; use base qw(Bugzilla::Auth::Login); use fields qw(_login_token); diff --git a/Bugzilla/Auth/Login/Env.pm b/Bugzilla/Auth/Login/Env.pm index 51261e6b9..c3d30ccbe 100644 --- a/Bugzilla/Auth/Login/Env.pm +++ b/Bugzilla/Auth/Login/Env.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Login::Env; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Auth::Login); diff --git a/Bugzilla/Auth/Login/Stack.pm b/Bugzilla/Auth/Login/Stack.pm index ad5598576..dc35998e4 100644 --- a/Bugzilla/Auth/Login/Stack.pm +++ b/Bugzilla/Auth/Login/Stack.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Login::Stack; use 5.10.1; use strict; +use warnings; use base qw(Bugzilla::Auth::Login); use fields qw( diff --git a/Bugzilla/Auth/Persist/Cookie.pm b/Bugzilla/Auth/Persist/Cookie.pm index 6f4eac96d..2d1291f3b 100644 --- a/Bugzilla/Auth/Persist/Cookie.pm +++ b/Bugzilla/Auth/Persist/Cookie.pm @@ -9,6 +9,8 @@ package Bugzilla::Auth::Persist::Cookie; use 5.10.1; use strict; +use warnings; + use fields qw(); use Bugzilla::Constants; diff --git a/Bugzilla/Auth/Verify.pm b/Bugzilla/Auth/Verify.pm index ecb64e22a..e44fb06ae 100644 --- a/Bugzilla/Auth/Verify.pm +++ b/Bugzilla/Auth/Verify.pm @@ -9,6 +9,8 @@ package Bugzilla::Auth::Verify; use 5.10.1; use strict; +use warnings; + use fields qw(); use Bugzilla::Constants; diff --git a/Bugzilla/Auth/Verify/DB.pm b/Bugzilla/Auth/Verify/DB.pm index d4a4674d3..ad7f15d24 100644 --- a/Bugzilla/Auth/Verify/DB.pm +++ b/Bugzilla/Auth/Verify/DB.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Verify::DB; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Auth::Verify); diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm index c113124f1..e37f55793 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/Verify/LDAP.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Verify::LDAP; use 5.10.1; use strict; +use warnings; use base qw(Bugzilla::Auth::Verify); use fields qw( diff --git a/Bugzilla/Auth/Verify/RADIUS.pm b/Bugzilla/Auth/Verify/RADIUS.pm index e5157c68f..283d9b466 100644 --- a/Bugzilla/Auth/Verify/RADIUS.pm +++ b/Bugzilla/Auth/Verify/RADIUS.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Verify::RADIUS; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Auth::Verify); diff --git a/Bugzilla/Auth/Verify/Stack.pm b/Bugzilla/Auth/Verify/Stack.pm index 52c449e22..3e5db3cec 100644 --- a/Bugzilla/Auth/Verify/Stack.pm +++ b/Bugzilla/Auth/Verify/Stack.pm @@ -9,6 +9,7 @@ package Bugzilla::Auth::Verify::Stack; use 5.10.1; use strict; +use warnings; use base qw(Bugzilla::Auth::Verify); use fields qw( diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index b762a6500..c4ddb943c 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -9,6 +9,7 @@ package Bugzilla::Bug; use 5.10.1; use strict; +use warnings; use Bugzilla::Attachment; use Bugzilla::Constants; diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index d66df579d..8b4219787 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -9,6 +9,7 @@ package Bugzilla::BugMail; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::User; diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm index 39b985d29..1e836ca1e 100644 --- a/Bugzilla/BugUrl.pm +++ b/Bugzilla/BugUrl.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/BugUrl/Bugzilla.pm b/Bugzilla/BugUrl/Bugzilla.pm index db132eeff..402ff1509 100644 --- a/Bugzilla/BugUrl/Bugzilla.pm +++ b/Bugzilla/BugUrl/Bugzilla.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Bugzilla; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/Bugzilla/Local.pm b/Bugzilla/BugUrl/Bugzilla/Local.pm index 7381d5610..7b9cb6a4f 100644 --- a/Bugzilla/BugUrl/Bugzilla/Local.pm +++ b/Bugzilla/BugUrl/Bugzilla/Local.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Bugzilla::Local; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl::Bugzilla); diff --git a/Bugzilla/BugUrl/Debian.pm b/Bugzilla/BugUrl/Debian.pm index 97ad4b545..2b611aa57 100644 --- a/Bugzilla/BugUrl/Debian.pm +++ b/Bugzilla/BugUrl/Debian.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Debian; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/GitHub.pm b/Bugzilla/BugUrl/GitHub.pm index 2c35bfb08..22814dc50 100644 --- a/Bugzilla/BugUrl/GitHub.pm +++ b/Bugzilla/BugUrl/GitHub.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::GitHub; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/Google.pm b/Bugzilla/BugUrl/Google.pm index dd9ab7ff4..71a9c46fb 100644 --- a/Bugzilla/BugUrl/Google.pm +++ b/Bugzilla/BugUrl/Google.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Google; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/JIRA.pm b/Bugzilla/BugUrl/JIRA.pm index e358ff439..e9d2a2d2a 100644 --- a/Bugzilla/BugUrl/JIRA.pm +++ b/Bugzilla/BugUrl/JIRA.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::JIRA; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/Launchpad.pm b/Bugzilla/BugUrl/Launchpad.pm index 3409cbe19..0362747a2 100644 --- a/Bugzilla/BugUrl/Launchpad.pm +++ b/Bugzilla/BugUrl/Launchpad.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Launchpad; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/MantisBT.pm b/Bugzilla/BugUrl/MantisBT.pm index 8dffabcbe..60d3b578e 100644 --- a/Bugzilla/BugUrl/MantisBT.pm +++ b/Bugzilla/BugUrl/MantisBT.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::MantisBT; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/SourceForge.pm b/Bugzilla/BugUrl/SourceForge.pm index 630b97d7a..acba0df28 100644 --- a/Bugzilla/BugUrl/SourceForge.pm +++ b/Bugzilla/BugUrl/SourceForge.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::SourceForge; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUrl/Trac.pm b/Bugzilla/BugUrl/Trac.pm index edb18e8fd..fe74abf33 100644 --- a/Bugzilla/BugUrl/Trac.pm +++ b/Bugzilla/BugUrl/Trac.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUrl::Trac; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::BugUrl); diff --git a/Bugzilla/BugUserLastVisit.pm b/Bugzilla/BugUserLastVisit.pm index c4acfa56b..9c7dcd452 100644 --- a/Bugzilla/BugUserLastVisit.pm +++ b/Bugzilla/BugUserLastVisit.pm @@ -9,6 +9,7 @@ package Bugzilla::BugUserLastVisit; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 656c462b7..79e3e053b 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -9,6 +9,7 @@ package Bugzilla::CGI; use 5.10.1; use strict; +use warnings; use parent qw(CGI); diff --git a/Bugzilla/Chart.pm b/Bugzilla/Chart.pm index 0329b9a0c..c8cd41b52 100644 --- a/Bugzilla/Chart.pm +++ b/Bugzilla/Chart.pm @@ -15,6 +15,7 @@ package Bugzilla::Chart; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Util; diff --git a/Bugzilla/Classification.pm b/Bugzilla/Classification.pm index 0ae548bb6..09f71baaf 100644 --- a/Bugzilla/Classification.pm +++ b/Bugzilla/Classification.pm @@ -9,6 +9,7 @@ package Bugzilla::Classification; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Field; diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index 238770d57..c235b8d30 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -9,6 +9,7 @@ package Bugzilla::Comment; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Comment/TagWeights.pm b/Bugzilla/Comment/TagWeights.pm index f1a220a47..7dba53e34 100644 --- a/Bugzilla/Comment/TagWeights.pm +++ b/Bugzilla/Comment/TagWeights.pm @@ -9,6 +9,7 @@ package Bugzilla::Comment::TagWeights; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 3d56cc8c2..9bc0a4493 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -9,6 +9,7 @@ package Bugzilla::Component; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object); diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index 5d9a8061c..04c2c0c6f 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -9,8 +9,10 @@ package Bugzilla::Config; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); + use Bugzilla::Constants; use Bugzilla::Hook; use Data::Dumper; diff --git a/Bugzilla/Config/Admin.pm b/Bugzilla/Config/Admin.pm index 97f8ea390..41d929298 100644 --- a/Bugzilla/Config/Admin.pm +++ b/Bugzilla/Config/Admin.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Admin; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/Advanced.pm b/Bugzilla/Config/Advanced.pm index eec2816d2..8356c3361 100644 --- a/Bugzilla/Config/Advanced.pm +++ b/Bugzilla/Config/Advanced.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Advanced; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/Attachment.pm b/Bugzilla/Config/Attachment.pm index f31e57254..580ec46d9 100644 --- a/Bugzilla/Config/Attachment.pm +++ b/Bugzilla/Config/Attachment.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Attachment; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/Auth.pm b/Bugzilla/Config/Auth.pm index 699881122..bf5db9d97 100644 --- a/Bugzilla/Config/Auth.pm +++ b/Bugzilla/Config/Auth.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Auth; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/BugChange.pm b/Bugzilla/Config/BugChange.pm index 53fc68d00..0acdc0ce4 100644 --- a/Bugzilla/Config/BugChange.pm +++ b/Bugzilla/Config/BugChange.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::BugChange; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; use Bugzilla::Status; diff --git a/Bugzilla/Config/BugFields.pm b/Bugzilla/Config/BugFields.pm index 39c43cb92..ef2faa64b 100644 --- a/Bugzilla/Config/BugFields.pm +++ b/Bugzilla/Config/BugFields.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::BugFields; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; use Bugzilla::Field; diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index e9e993396..9f38436e8 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Common; use 5.10.1; use strict; +use warnings; use Email::Address; use Socket; diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm index faf86c567..654e569ba 100644 --- a/Bugzilla/Config/Core.pm +++ b/Bugzilla/Config/Core.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Core; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/DependencyGraph.pm b/Bugzilla/Config/DependencyGraph.pm index 51836405c..a9b8598df 100644 --- a/Bugzilla/Config/DependencyGraph.pm +++ b/Bugzilla/Config/DependencyGraph.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::DependencyGraph; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/General.pm b/Bugzilla/Config/General.pm index a401e98ed..5efaa6f6c 100644 --- a/Bugzilla/Config/General.pm +++ b/Bugzilla/Config/General.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::General; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm index 076f841fd..e827834a0 100644 --- a/Bugzilla/Config/GroupSecurity.pm +++ b/Bugzilla/Config/GroupSecurity.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::GroupSecurity; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; use Bugzilla::Group; diff --git a/Bugzilla/Config/LDAP.pm b/Bugzilla/Config/LDAP.pm index 4a46f40d2..0bc8240df 100644 --- a/Bugzilla/Config/LDAP.pm +++ b/Bugzilla/Config/LDAP.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::LDAP; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/MTA.pm b/Bugzilla/Config/MTA.pm index 2f4af72f4..ec74b20b3 100644 --- a/Bugzilla/Config/MTA.pm +++ b/Bugzilla/Config/MTA.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::MTA; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; # Return::Value 1.666002 pollutes the error log with warnings about this diff --git a/Bugzilla/Config/Memcached.pm b/Bugzilla/Config/Memcached.pm index 08d8ce0e7..292803d86 100644 --- a/Bugzilla/Config/Memcached.pm +++ b/Bugzilla/Config/Memcached.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Memcached; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/PatchViewer.pm b/Bugzilla/Config/PatchViewer.pm index 2005e4c4a..d090c1ee6 100644 --- a/Bugzilla/Config/PatchViewer.pm +++ b/Bugzilla/Config/PatchViewer.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::PatchViewer; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/Query.pm b/Bugzilla/Config/Query.pm index c7b33f620..f18bb90df 100644 --- a/Bugzilla/Config/Query.pm +++ b/Bugzilla/Config/Query.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::Query; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/RADIUS.pm b/Bugzilla/Config/RADIUS.pm index 17fbdd7dd..8e30b07a9 100644 --- a/Bugzilla/Config/RADIUS.pm +++ b/Bugzilla/Config/RADIUS.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::RADIUS; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/ShadowDB.pm b/Bugzilla/Config/ShadowDB.pm index 65c572980..5dbbb5202 100644 --- a/Bugzilla/Config/ShadowDB.pm +++ b/Bugzilla/Config/ShadowDB.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::ShadowDB; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Config/UserMatch.pm b/Bugzilla/Config/UserMatch.pm index 53fb5136f..3f74a7c44 100644 --- a/Bugzilla/Config/UserMatch.pm +++ b/Bugzilla/Config/UserMatch.pm @@ -9,6 +9,7 @@ package Bugzilla::Config::UserMatch; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 2009fbcfb..59333795f 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -9,6 +9,7 @@ package Bugzilla::Constants; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 003629011..29f431b12 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -9,6 +9,7 @@ package Bugzilla::DB; use 5.10.1; use strict; +use warnings; use DBI; diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 28df1f0e8..f03c827b3 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -23,6 +23,7 @@ package Bugzilla::DB::Mysql; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB); diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 23474fe15..7424019ac 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -23,6 +23,7 @@ package Bugzilla::DB::Oracle; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB); @@ -721,6 +722,7 @@ package Bugzilla::DB::Oracle::st; use 5.10.1; use strict; +use warnings; use parent -norequire, qw(DBI::st); diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 165eea559..9c5758432 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -23,6 +23,7 @@ package Bugzilla::DB::Pg; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Version; diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index e2ace02c3..8c81f7a59 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -17,6 +17,7 @@ package Bugzilla::DB::Schema; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Hook; diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm index 9d634243f..0195fcb06 100644 --- a/Bugzilla/DB/Schema/Mysql.pm +++ b/Bugzilla/DB/Schema/Mysql.pm @@ -15,6 +15,7 @@ package Bugzilla::DB::Schema::Mysql; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; diff --git a/Bugzilla/DB/Schema/Oracle.pm b/Bugzilla/DB/Schema/Oracle.pm index 1554a0fe1..8fb5479b1 100644 --- a/Bugzilla/DB/Schema/Oracle.pm +++ b/Bugzilla/DB/Schema/Oracle.pm @@ -15,6 +15,7 @@ package Bugzilla::DB::Schema::Oracle; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB::Schema); use Carp qw(confess); diff --git a/Bugzilla/DB/Schema/Pg.pm b/Bugzilla/DB/Schema/Pg.pm index fa784ef7d..55a932272 100644 --- a/Bugzilla/DB/Schema/Pg.pm +++ b/Bugzilla/DB/Schema/Pg.pm @@ -15,6 +15,7 @@ package Bugzilla::DB::Schema::Pg; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB::Schema); use Storable qw(dclone); diff --git a/Bugzilla/DB/Schema/Sqlite.pm b/Bugzilla/DB/Schema/Sqlite.pm index b29d7da22..ccdbfd8aa 100644 --- a/Bugzilla/DB/Schema/Sqlite.pm +++ b/Bugzilla/DB/Schema/Sqlite.pm @@ -9,6 +9,7 @@ package Bugzilla::DB::Schema::Sqlite; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB::Schema); diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm index cffe3b65c..ddafc1696 100644 --- a/Bugzilla/DB/Sqlite.pm +++ b/Bugzilla/DB/Sqlite.pm @@ -9,6 +9,7 @@ package Bugzilla::DB::Sqlite; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::DB); diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm index 37b28095a..05a7ce7b3 100644 --- a/Bugzilla/Error.pm +++ b/Bugzilla/Error.pm @@ -9,6 +9,7 @@ package Bugzilla::Error; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); diff --git a/Bugzilla/Extension.pm b/Bugzilla/Extension.pm index 53bf6cd66..17193f1b6 100644 --- a/Bugzilla/Extension.pm +++ b/Bugzilla/Extension.pm @@ -9,6 +9,7 @@ package Bugzilla::Extension; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Error; diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index e72a94293..761f7b94e 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -59,6 +59,7 @@ package Bugzilla::Field; use 5.10.1; use strict; +use warnings; use parent qw(Exporter Bugzilla::Object); @Bugzilla::Field::EXPORT = qw(check_field get_field_id get_legal_field_values); diff --git a/Bugzilla/Field/Choice.pm b/Bugzilla/Field/Choice.pm index 6f730072f..a66f69cee 100644 --- a/Bugzilla/Field/Choice.pm +++ b/Bugzilla/Field/Choice.pm @@ -9,6 +9,7 @@ package Bugzilla::Field::Choice; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object); diff --git a/Bugzilla/Field/ChoiceInterface.pm b/Bugzilla/Field/ChoiceInterface.pm index f7f5e3b73..634d36ad1 100644 --- a/Bugzilla/Field/ChoiceInterface.pm +++ b/Bugzilla/Field/ChoiceInterface.pm @@ -9,6 +9,7 @@ package Bugzilla::Field::ChoiceInterface; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Error; diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index ff9d236db..381cc1174 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -9,6 +9,7 @@ package Bugzilla::Flag; use 5.10.1; use strict; +use warnings; =head1 NAME diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index 34973684a..5cbfdd979 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -9,6 +9,7 @@ package Bugzilla::FlagType; use 5.10.1; use strict; +use warnings; =head1 NAME diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 965fa226f..a750e353e 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -9,6 +9,7 @@ package Bugzilla::Group; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 5e4114398..14bac0435 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -9,6 +9,7 @@ package Bugzilla::Hook; use 5.10.1; use strict; +use warnings; sub process { my ($name, $args) = @_; diff --git a/Bugzilla/Install.pm b/Bugzilla/Install.pm index 41f88d70b..07bc9d6c3 100644 --- a/Bugzilla/Install.pm +++ b/Bugzilla/Install.pm @@ -17,6 +17,7 @@ package Bugzilla::Install; use 5.10.1; use strict; +use warnings; use Bugzilla::Component; use Bugzilla::Config qw(:admin); diff --git a/Bugzilla/Install/CPAN.pm b/Bugzilla/Install/CPAN.pm index ba301863d..19f143190 100644 --- a/Bugzilla/Install/CPAN.pm +++ b/Bugzilla/Install/CPAN.pm @@ -9,6 +9,7 @@ package Bugzilla::Install::CPAN; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); our @EXPORT = qw( diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 74b2b1e39..dd0f3608b 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -12,6 +12,7 @@ package Bugzilla::Install::DB; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Hook; diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index d980a2199..157a8429e 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -17,6 +17,7 @@ package Bugzilla::Install::Filesystem; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Error; diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index 71a9c6ae0..d4d1311cc 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -17,6 +17,7 @@ package Bugzilla::Install::Localconfig; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Install::Util qw(bin_loc install_string); diff --git a/Bugzilla/Install/Requirements.pm b/Bugzilla/Install/Requirements.pm index d9e49017d..06b061f57 100644 --- a/Bugzilla/Install/Requirements.pm +++ b/Bugzilla/Install/Requirements.pm @@ -15,6 +15,7 @@ package Bugzilla::Install::Requirements; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Install::Util qw(install_string bin_loc diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index 66ea7169e..c05037061 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -13,6 +13,7 @@ package Bugzilla::Install::Util; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; diff --git a/Bugzilla/Job/BugMail.pm b/Bugzilla/Job/BugMail.pm index 9c176b005..e0b7f5448 100644 --- a/Bugzilla/Job/BugMail.pm +++ b/Bugzilla/Job/BugMail.pm @@ -9,6 +9,7 @@ package Bugzilla::Job::BugMail; use 5.10.1; use strict; +use warnings; use Bugzilla::BugMail; BEGIN { eval "use parent qw(Bugzilla::Job::Mailer)"; } diff --git a/Bugzilla/Job/Mailer.pm b/Bugzilla/Job/Mailer.pm index 8fce80dd0..cd1c23445 100644 --- a/Bugzilla/Job/Mailer.pm +++ b/Bugzilla/Job/Mailer.pm @@ -9,6 +9,7 @@ package Bugzilla::Job::Mailer; use 5.10.1; use strict; +use warnings; use Bugzilla::Mailer; BEGIN { eval "use parent qw(TheSchwartz::Worker)"; } diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm index 4ff5750da..d5ceda8e9 100644 --- a/Bugzilla/JobQueue.pm +++ b/Bugzilla/JobQueue.pm @@ -9,6 +9,7 @@ package Bugzilla::JobQueue; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Error; diff --git a/Bugzilla/JobQueue/Runner.pm b/Bugzilla/JobQueue/Runner.pm index a0d6a77cb..104a97b0b 100644 --- a/Bugzilla/JobQueue/Runner.pm +++ b/Bugzilla/JobQueue/Runner.pm @@ -13,6 +13,7 @@ package Bugzilla::JobQueue::Runner; use 5.10.1; use strict; +use warnings; use Cwd qw(abs_path); use File::Basename; diff --git a/Bugzilla/Keyword.pm b/Bugzilla/Keyword.pm index a8c098854..afa93e1e9 100644 --- a/Bugzilla/Keyword.pm +++ b/Bugzilla/Keyword.pm @@ -9,6 +9,7 @@ package Bugzilla::Keyword; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 169363b6d..576f69da8 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -9,6 +9,7 @@ package Bugzilla::Mailer; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); @Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker); diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index 2763ecb2b..0731d4fed 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -9,6 +9,7 @@ package Bugzilla::Migrate; use 5.10.1; use strict; +use warnings; use Bugzilla::Attachment; use Bugzilla::Bug qw(LogActivityEntry); diff --git a/Bugzilla/Migrate/Gnats.pm b/Bugzilla/Migrate/Gnats.pm index 2778d28cc..5feda4b8d 100644 --- a/Bugzilla/Migrate/Gnats.pm +++ b/Bugzilla/Migrate/Gnats.pm @@ -9,6 +9,7 @@ package Bugzilla::Migrate::Gnats; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Migrate); diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm index 83438e7c6..cf7e3e35f 100644 --- a/Bugzilla/Milestone.pm +++ b/Bugzilla/Milestone.pm @@ -9,6 +9,7 @@ package Bugzilla::Milestone; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index f20803632..8f25e2b20 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -9,6 +9,7 @@ package Bugzilla::Object; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Hook; diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 3d4de7430..30ebc7c6c 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -9,6 +9,7 @@ package Bugzilla::Product; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Field::ChoiceInterface Bugzilla::Object); diff --git a/Bugzilla/RNG.pm b/Bugzilla/RNG.pm index 14b831672..96e442fa0 100644 --- a/Bugzilla/RNG.pm +++ b/Bugzilla/RNG.pm @@ -9,6 +9,7 @@ package Bugzilla::RNG; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); use Bugzilla::Constants qw(ON_WINDOWS); diff --git a/Bugzilla/Report.pm b/Bugzilla/Report.pm index fe2b82661..10af2ea9e 100644 --- a/Bugzilla/Report.pm +++ b/Bugzilla/Report.pm @@ -9,6 +9,7 @@ package Bugzilla::Report; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 036e0a605..59d7f86ec 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -9,6 +9,7 @@ package Bugzilla::Search; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); @Bugzilla::Search::EXPORT = qw( diff --git a/Bugzilla/Search/Clause.pm b/Bugzilla/Search/Clause.pm index 9d3d690a3..1d7872c78 100644 --- a/Bugzilla/Search/Clause.pm +++ b/Bugzilla/Search/Clause.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::Clause; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Search::Condition qw(condition); diff --git a/Bugzilla/Search/ClauseGroup.pm b/Bugzilla/Search/ClauseGroup.pm index eb306525c..590c737fa 100644 --- a/Bugzilla/Search/ClauseGroup.pm +++ b/Bugzilla/Search/ClauseGroup.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::ClauseGroup; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Search::Clause); diff --git a/Bugzilla/Search/Condition.pm b/Bugzilla/Search/Condition.pm index eab4ab79d..306a63eed 100644 --- a/Bugzilla/Search/Condition.pm +++ b/Bugzilla/Search/Condition.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::Condition; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); our @EXPORT_OK = qw(condition); diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index 98e8a6482..c00f18351 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::Quicksearch; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Constants; diff --git a/Bugzilla/Search/Recent.pm b/Bugzilla/Search/Recent.pm index cc1c3c582..e774c7fe0 100644 --- a/Bugzilla/Search/Recent.pm +++ b/Bugzilla/Search/Recent.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::Recent; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm index 2e4c4a336..50a9cdd67 100644 --- a/Bugzilla/Search/Saved.pm +++ b/Bugzilla/Search/Saved.pm @@ -9,6 +9,7 @@ package Bugzilla::Search::Saved; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Send/Sendmail.pm b/Bugzilla/Send/Sendmail.pm index 9496ff97c..48312b2fa 100644 --- a/Bugzilla/Send/Sendmail.pm +++ b/Bugzilla/Send/Sendmail.pm @@ -9,6 +9,7 @@ package Bugzilla::Send::Sendmail; use 5.10.1; use strict; +use warnings; use parent qw(Email::Send::Sendmail); diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index 6c11f5dbc..22202c6f1 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -16,6 +16,7 @@ package Bugzilla::Series; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Util; diff --git a/Bugzilla/Status.pm b/Bugzilla/Status.pm index 1f8862a36..275510216 100644 --- a/Bugzilla/Status.pm +++ b/Bugzilla/Status.pm @@ -9,6 +9,7 @@ package Bugzilla::Status; use 5.10.1; use strict; +use warnings; # This subclasses Bugzilla::Field::Choice instead of implementing # ChoiceInterface, because a bug status literally is a special type diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 52ccee593..96896b47e 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -10,6 +10,7 @@ package Bugzilla::Template; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::WebService::Constants; diff --git a/Bugzilla/Template/Context.pm b/Bugzilla/Template/Context.pm index 1e75d1d6f..470e6a9ee 100644 --- a/Bugzilla/Template/Context.pm +++ b/Bugzilla/Template/Context.pm @@ -10,6 +10,7 @@ package Bugzilla::Template::Context; use 5.10.1; use strict; +use warnings; use parent qw(Template::Context); diff --git a/Bugzilla/Template/Plugin/Bugzilla.pm b/Bugzilla/Template/Plugin/Bugzilla.pm index f0de2ed4d..806dd903b 100644 --- a/Bugzilla/Template/Plugin/Bugzilla.pm +++ b/Bugzilla/Template/Plugin/Bugzilla.pm @@ -9,6 +9,7 @@ package Bugzilla::Template::Plugin::Bugzilla; use 5.10.1; use strict; +use warnings; use parent qw(Template::Plugin); diff --git a/Bugzilla/Template/Plugin/Hook.pm b/Bugzilla/Template/Plugin/Hook.pm index 19260f005..669c77614 100644 --- a/Bugzilla/Template/Plugin/Hook.pm +++ b/Bugzilla/Template/Plugin/Hook.pm @@ -9,6 +9,7 @@ package Bugzilla::Template::Plugin::Hook; use 5.10.1; use strict; +use warnings; use parent qw(Template::Plugin); diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index 71f24183b..670f5a661 100644 --- a/Bugzilla/Token.pm +++ b/Bugzilla/Token.pm @@ -9,6 +9,7 @@ package Bugzilla::Token; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; use Bugzilla::Error; diff --git a/Bugzilla/Update.pm b/Bugzilla/Update.pm index 6a1012199..72a7108a8 100644 --- a/Bugzilla/Update.pm +++ b/Bugzilla/Update.pm @@ -9,6 +9,7 @@ package Bugzilla::Update; use 5.10.1; use strict; +use warnings; use Bugzilla::Constants; diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 3efe02633..58565daf9 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -9,6 +9,7 @@ package Bugzilla::User; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Util; diff --git a/Bugzilla/User/APIKey.pm b/Bugzilla/User/APIKey.pm index 75a4a6beb..d268a0a93 100644 --- a/Bugzilla/User/APIKey.pm +++ b/Bugzilla/User/APIKey.pm @@ -9,6 +9,7 @@ package Bugzilla::User::APIKey; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/User/Setting.pm b/Bugzilla/User/Setting.pm index 5b518da65..ea3bbfb54 100644 --- a/Bugzilla/User/Setting.pm +++ b/Bugzilla/User/Setting.pm @@ -10,6 +10,7 @@ package Bugzilla::User::Setting; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); diff --git a/Bugzilla/User/Setting/Lang.pm b/Bugzilla/User/Setting/Lang.pm index 4465185e3..d980b7a92 100644 --- a/Bugzilla/User/Setting/Lang.pm +++ b/Bugzilla/User/Setting/Lang.pm @@ -9,6 +9,7 @@ package Bugzilla::User::Setting::Lang; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::User::Setting); diff --git a/Bugzilla/User/Setting/Skin.pm b/Bugzilla/User/Setting/Skin.pm index 1e4e95a03..7b0688c0c 100644 --- a/Bugzilla/User/Setting/Skin.pm +++ b/Bugzilla/User/Setting/Skin.pm @@ -10,6 +10,7 @@ package Bugzilla::User::Setting::Skin; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::User::Setting); diff --git a/Bugzilla/User/Setting/Timezone.pm b/Bugzilla/User/Setting/Timezone.pm index 848fa418f..8959d1dda 100644 --- a/Bugzilla/User/Setting/Timezone.pm +++ b/Bugzilla/User/Setting/Timezone.pm @@ -9,6 +9,7 @@ package Bugzilla::User::Setting::Timezone; use 5.10.1; use strict; +use warnings; use DateTime::TimeZone; diff --git a/Bugzilla/UserAgent.pm b/Bugzilla/UserAgent.pm index 4e685cacc..963e30511 100644 --- a/Bugzilla/UserAgent.pm +++ b/Bugzilla/UserAgent.pm @@ -9,6 +9,7 @@ package Bugzilla::UserAgent; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); our @EXPORT = qw(detect_platform detect_op_sys); diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 4f0711b7e..fa74ee604 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -9,6 +9,7 @@ package Bugzilla::Util; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); @Bugzilla::Util::EXPORT = qw(trick_taint detaint_natural detaint_signed diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm index c6b178a8a..4b332ff2b 100644 --- a/Bugzilla/Version.pm +++ b/Bugzilla/Version.pm @@ -9,6 +9,7 @@ package Bugzilla::Version; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object Exporter); diff --git a/Bugzilla/WebService.pm b/Bugzilla/WebService.pm index b8404251a..eb85db927 100644 --- a/Bugzilla/WebService.pm +++ b/Bugzilla/WebService.pm @@ -11,6 +11,7 @@ package Bugzilla::WebService; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Server; diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 0346511a9..4689ae0f2 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Bug; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); diff --git a/Bugzilla/WebService/BugUserLastVisit.pm b/Bugzilla/WebService/BugUserLastVisit.pm index 71b637fef..0fc214db8 100644 --- a/Bugzilla/WebService/BugUserLastVisit.pm +++ b/Bugzilla/WebService/BugUserLastVisit.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::BugUserLastVisit; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); diff --git a/Bugzilla/WebService/Bugzilla.pm b/Bugzilla/WebService/Bugzilla.pm index 6b5f9844f..8333f99c4 100644 --- a/Bugzilla/WebService/Bugzilla.pm +++ b/Bugzilla/WebService/Bugzilla.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Bugzilla; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); use Bugzilla::Constants; diff --git a/Bugzilla/WebService/Classification.pm b/Bugzilla/WebService/Classification.pm index bbc967ce7..8e1b3ae8a 100644 --- a/Bugzilla/WebService/Classification.pm +++ b/Bugzilla/WebService/Classification.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Classification; use 5.10.1; use strict; +use warnings; use parent qw (Bugzilla::WebService); diff --git a/Bugzilla/WebService/Component.pm b/Bugzilla/WebService/Component.pm index edf3d5b8c..893e244b8 100644 --- a/Bugzilla/WebService/Component.pm +++ b/Bugzilla/WebService/Component.pm @@ -8,8 +8,9 @@ package Bugzilla::WebService::Component; use 5.10.1; - use strict; +use warnings; + use base qw(Bugzilla::WebService); use Bugzilla::Component; diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm index b6dead40d..f76f6b481 100644 --- a/Bugzilla/WebService/Constants.pm +++ b/Bugzilla/WebService/Constants.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Constants; use 5.10.1; use strict; +use warnings; use parent qw(Exporter); diff --git a/Bugzilla/WebService/FlagType.pm b/Bugzilla/WebService/FlagType.pm index b6b8aba89..cf654e659 100644 --- a/Bugzilla/WebService/FlagType.pm +++ b/Bugzilla/WebService/FlagType.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::FlagType; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); use Bugzilla::Component; diff --git a/Bugzilla/WebService/Group.pm b/Bugzilla/WebService/Group.pm index b13039241..d0ee6fdba 100644 --- a/Bugzilla/WebService/Group.pm +++ b/Bugzilla/WebService/Group.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Group; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); use Bugzilla::Constants; diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm index 2def77886..0e78836bf 100644 --- a/Bugzilla/WebService/Product.pm +++ b/Bugzilla/WebService/Product.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Product; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); use Bugzilla::Product; diff --git a/Bugzilla/WebService/Server.pm b/Bugzilla/WebService/Server.pm index 89cb1a130..7950c7a3b 100644 --- a/Bugzilla/WebService/Server.pm +++ b/Bugzilla/WebService/Server.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server; use 5.10.1; use strict; +use warnings; use Bugzilla::Error; use Bugzilla::Util qw(datetime_from); diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm index 177e2618d..6cda47480 100644 --- a/Bugzilla/WebService/Server/JSONRPC.pm +++ b/Bugzilla/WebService/Server/JSONRPC.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::JSONRPC; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Server; BEGIN { diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm index bd1b500a5..5ab973f1a 100644 --- a/Bugzilla/WebService/Server/REST.pm +++ b/Bugzilla/WebService/Server/REST.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService::Server::JSONRPC); diff --git a/Bugzilla/WebService/Server/REST/Resources/Bug.pm b/Bugzilla/WebService/Server/REST/Resources/Bug.pm index 7ab111d86..cf9f054c7 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Bug.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Bug.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Bug; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Bug; diff --git a/Bugzilla/WebService/Server/REST/Resources/Bugzilla.pm b/Bugzilla/WebService/Server/REST/Resources/Bugzilla.pm index 1c86f77bc..a8f3f9330 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Bugzilla.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Bugzilla.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Bugzilla; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Bugzilla; diff --git a/Bugzilla/WebService/Server/REST/Resources/Classification.pm b/Bugzilla/WebService/Server/REST/Resources/Classification.pm index 2bbc05c72..3f8d32a03 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Classification.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Classification.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Classification; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Classification; diff --git a/Bugzilla/WebService/Server/REST/Resources/Component.pm b/Bugzilla/WebService/Server/REST/Resources/Component.pm index 8c047d409..198c09332 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Component.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Component.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Component; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Component; diff --git a/Bugzilla/WebService/Server/REST/Resources/FlagType.pm b/Bugzilla/WebService/Server/REST/Resources/FlagType.pm index 1de5b1264..21dad0f73 100644 --- a/Bugzilla/WebService/Server/REST/Resources/FlagType.pm +++ b/Bugzilla/WebService/Server/REST/Resources/FlagType.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::FlagType; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::FlagType; diff --git a/Bugzilla/WebService/Server/REST/Resources/Group.pm b/Bugzilla/WebService/Server/REST/Resources/Group.pm index 62f8af6dd..b052e384b 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Group.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Group.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Group; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Group; diff --git a/Bugzilla/WebService/Server/REST/Resources/Product.pm b/Bugzilla/WebService/Server/REST/Resources/Product.pm index fef7c6174..607b94b53 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Product.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Product.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Product; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Product; diff --git a/Bugzilla/WebService/Server/REST/Resources/User.pm b/Bugzilla/WebService/Server/REST/Resources/User.pm index 539a9313a..a83109e73 100644 --- a/Bugzilla/WebService/Server/REST/Resources/User.pm +++ b/Bugzilla/WebService/Server/REST/Resources/User.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::User; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::User; diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm index 40c66a8f9..8f9070ae7 100644 --- a/Bugzilla/WebService/Server/XMLRPC.pm +++ b/Bugzilla/WebService/Server/XMLRPC.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::XMLRPC; use 5.10.1; use strict; +use warnings; use XMLRPC::Transport::HTTP; use Bugzilla::WebService::Server; @@ -107,6 +108,7 @@ package Bugzilla::XMLRPC::Deserializer; use 5.10.1; use strict; +use warnings; # We can't use "use parent" because XMLRPC::Serializer doesn't return # a true value. @@ -205,6 +207,7 @@ package Bugzilla::XMLRPC::SOM; use 5.10.1; use strict; +use warnings; use XMLRPC::Lite; our @ISA = qw(XMLRPC::SOM); @@ -231,6 +234,7 @@ package Bugzilla::XMLRPC::Serializer; use 5.10.1; use strict; +use warnings; use Scalar::Util qw(blessed reftype); # We can't use "use parent" because XMLRPC::Serializer doesn't return diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index 32d6f28ec..4c8af7f6c 100644 --- a/Bugzilla/WebService/User.pm +++ b/Bugzilla/WebService/User.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::User; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::WebService); diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm index 6290139a3..e2bc78002 100644 --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Util; use 5.10.1; use strict; +use warnings; use Bugzilla::Flag; use Bugzilla::FlagType; diff --git a/Bugzilla/Whine.pm b/Bugzilla/Whine.pm index 488127dfa..eeaea6da4 100644 --- a/Bugzilla/Whine.pm +++ b/Bugzilla/Whine.pm @@ -9,6 +9,7 @@ package Bugzilla::Whine; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Whine/Query.pm b/Bugzilla/Whine/Query.pm index a4fd54539..b2a2c9e07 100644 --- a/Bugzilla/Whine/Query.pm +++ b/Bugzilla/Whine/Query.pm @@ -9,6 +9,7 @@ package Bugzilla::Whine::Query; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); diff --git a/Bugzilla/Whine/Schedule.pm b/Bugzilla/Whine/Schedule.pm index f16c629af..11f0bf16f 100644 --- a/Bugzilla/Whine/Schedule.pm +++ b/Bugzilla/Whine/Schedule.pm @@ -9,6 +9,7 @@ package Bugzilla::Whine::Schedule; use 5.10.1; use strict; +use warnings; use parent qw(Bugzilla::Object); @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/attachment.cgi b/attachment.cgi index 94510fb19..f2eca5694 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/buglist.cgi b/buglist.cgi index d88939171..eeea3bdf5 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -29,6 +29,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/checksetup.pl b/checksetup.pl index 145faf04e..c7e8994e5 100755 --- a/checksetup.pl +++ b/checksetup.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/. @@ -12,8 +12,10 @@ # Initialization ###################################################################### -use strict; use 5.10.1; +use strict; +use warnings; + use File::Basename; use Getopt::Long qw(:config bundling); use Pod::Usage; diff --git a/clean-bug-user-last-visit.pl b/clean-bug-user-last-visit.pl index 9884b7c48..57486bfed 100755 --- a/clean-bug-user-last-visit.pl +++ b/clean-bug-user-last-visit.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/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/. diff --git a/colchange.cgi b/colchange.cgi index 66b661e5a..77d9f11ee 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/collectstats.pl b/collectstats.pl index 330fae5b3..3473c9e71 100755 --- a/collectstats.pl +++ b/collectstats.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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Getopt::Long qw(:config bundling); diff --git a/config.cgi b/config.cgi index 02f954726..56a9a3f8a 100755 --- a/config.cgi +++ b/config.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; 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<bz_webservice_demo.pl --help> 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 = <<END; package Bugzilla::Extension::$extension_name; use strict; +use warnings; + use constant NAME => '$extension_name'; $install_requirements __PACKAGE__->NAME; @@ -76,6 +80,8 @@ END my $extension_pm = <<END; package Bugzilla::Extension::$extension_name; use strict; +use warnings; + use parent qw(Bugzilla::Extension); $modules diff --git a/contrib/fixperms.pl b/contrib/fixperms.pl index b9ac2059c..33b042c66 100755 --- a/contrib/fixperms.pl +++ b/contrib/fixperms.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; diff --git a/contrib/merge-users.pl b/contrib/merge-users.pl index 62b087921..ddb828eef 100755 --- a/contrib/merge-users.pl +++ b/contrib/merge-users.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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,9 @@ # 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; =head1 NAME diff --git a/contrib/mysqld-watcher.pl b/contrib/mysqld-watcher.pl index 08a87b5fe..be93dcbb5 100755 --- a/contrib/mysqld-watcher.pl +++ b/contrib/mysqld-watcher.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/. @@ -9,7 +9,9 @@ # mysqld-watcher.pl - a script that watches the running instance of # mysqld and kills off any long-running SELECTs against the shadow_db # +use 5.10.1; use strict; +use warnings; # some configurables: diff --git a/contrib/recode.pl b/contrib/recode.pl index de204f155..e6da47b92 100755 --- a/contrib/recode.pl +++ b/contrib/recode.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/sendbugmail.pl b/contrib/sendbugmail.pl index da0eafd30..223d91f6c 100755 --- a/contrib/sendbugmail.pl +++ b/contrib/sendbugmail.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/contrib/sendunsentbugmail.pl b/contrib/sendunsentbugmail.pl index 474554135..b9034aa8d 100755 --- a/contrib/sendunsentbugmail.pl +++ b/contrib/sendunsentbugmail.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/contrib/syncLDAP.pl b/contrib/syncLDAP.pl index 6ad96477b..f618624ec 100755 --- a/contrib/syncLDAP.pl +++ b/contrib/syncLDAP.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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,9 @@ # 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); diff --git a/createaccount.cgi b/createaccount.cgi index c9516ab00..21d6cc8db 100755 --- a/createaccount.cgi +++ b/createaccount.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/describecomponents.cgi b/describecomponents.cgi index db8260b5d..f74dc75f4 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/describekeywords.cgi b/describekeywords.cgi index 2147ac47d..31bf0c13e 100755 --- a/describekeywords.cgi +++ b/describekeywords.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/duplicates.cgi b/duplicates.cgi index beac9c37e..c1bf036be 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editclassifications.cgi b/editclassifications.cgi index b743433b7..b06ce27ad 100755 --- a/editclassifications.cgi +++ b/editclassifications.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -9,6 +9,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editcomponents.cgi b/editcomponents.cgi index 4423931fe..7442365f3 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editfields.cgi b/editfields.cgi index 5ac9dccce..e8351bdd6 100755 --- a/editfields.cgi +++ b/editfields.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 73ef1e528..06144fc5c 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editgroups.cgi b/editgroups.cgi index 87c44f03c..2fd9f569a 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editkeywords.cgi b/editkeywords.cgi index 5a7f6643b..41496f362 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editmilestones.cgi b/editmilestones.cgi index 927c1a9d1..e20e623fb 100755 --- a/editmilestones.cgi +++ b/editmilestones.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editparams.cgi b/editparams.cgi index 3486d7061..ae569c2eb 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editproducts.cgi b/editproducts.cgi index 77d112f46..f2526575e 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editsettings.cgi b/editsettings.cgi index f2c6e2cc3..b10a497ba 100755 --- a/editsettings.cgi +++ b/editsettings.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editusers.cgi b/editusers.cgi index 5eb49d139..20c72ce90 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editvalues.cgi b/editvalues.cgi index 5bceed761..48775fc52 100755 --- a/editvalues.cgi +++ b/editvalues.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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,12 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. -# This is a script to edit the values of fields that have drop-down -# or select boxes. It is largely a copy of editmilestones.cgi, but -# with some cleanup. - use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editversions.cgi b/editversions.cgi index 2dce7bd0a..674a20b7e 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editwhines.cgi b/editwhines.cgi index 84a97b877..b11c44949 100755 --- a/editwhines.cgi +++ b/editwhines.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -12,6 +12,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/editworkflow.cgi b/editworkflow.cgi index 68cd98458..71b14af77 100755 --- a/editworkflow.cgi +++ b/editworkflow.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/email_in.pl b/email_in.pl index 03db450f7..ae4c42bde 100755 --- a/email_in.pl +++ b/email_in.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. diff --git a/enter_bug.cgi b/enter_bug.cgi index baf5d7833..3f22fe4b8 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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,6 +18,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/extensions/BmpConvert/Config.pm b/extensions/BmpConvert/Config.pm index 91808bc4b..4984f19a9 100644 --- a/extensions/BmpConvert/Config.pm +++ b/extensions/BmpConvert/Config.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::BmpConvert; use 5.10.1; use strict; +use warnings; + use constant NAME => 'BmpConvert'; use constant REQUIRED_MODULES => [ { diff --git a/extensions/BmpConvert/Extension.pm b/extensions/BmpConvert/Extension.pm index eb634f4a1..b8201f106 100644 --- a/extensions/BmpConvert/Extension.pm +++ b/extensions/BmpConvert/Extension.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::BmpConvert; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); use Image::Magick; diff --git a/extensions/Example/Config.pm b/extensions/Example/Config.pm index 13635dc7f..e7782ef6c 100644 --- a/extensions/Example/Config.pm +++ b/extensions/Example/Config.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::Example; use 5.10.1; use strict; +use warnings; + use constant NAME => 'Example'; use constant REQUIRED_MODULES => [ { diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index c9449d8b0..256589dab 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::Example; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); use Bugzilla::Constants; diff --git a/extensions/Example/lib/Auth/Login.pm b/extensions/Example/lib/Auth/Login.pm index c1cfe62cc..15c58a881 100644 --- a/extensions/Example/lib/Auth/Login.pm +++ b/extensions/Example/lib/Auth/Login.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::Example::Auth::Login; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Auth::Login); use constant user_can_create_account => 0; use Bugzilla::Constants; diff --git a/extensions/Example/lib/Auth/Verify.pm b/extensions/Example/lib/Auth/Verify.pm index df5059a05..49fd9fbb7 100644 --- a/extensions/Example/lib/Auth/Verify.pm +++ b/extensions/Example/lib/Auth/Verify.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::Example::Auth::Verify; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Auth::Verify); use Bugzilla::Constants; diff --git a/extensions/MoreBugUrl/Config.pm b/extensions/MoreBugUrl/Config.pm index 1e62306c4..e0eac5f8a 100644 --- a/extensions/MoreBugUrl/Config.pm +++ b/extensions/MoreBugUrl/Config.pm @@ -9,6 +9,7 @@ package Bugzilla::Extension::MoreBugUrl; use 5.10.1; use strict; +use warnings; use constant NAME => 'MoreBugUrl'; diff --git a/extensions/MoreBugUrl/Extension.pm b/extensions/MoreBugUrl/Extension.pm index ed0fe7b1f..18507f8d1 100644 --- a/extensions/MoreBugUrl/Extension.pm +++ b/extensions/MoreBugUrl/Extension.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); use constant MORE_SUB_CLASSES => qw( diff --git a/extensions/MoreBugUrl/lib/BitBucket.pm b/extensions/MoreBugUrl/lib/BitBucket.pm index fbb7be1a1..dcc85992d 100644 --- a/extensions/MoreBugUrl/lib/BitBucket.pm +++ b/extensions/MoreBugUrl/lib/BitBucket.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::BitBucket; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/GetSatisfaction.pm b/extensions/MoreBugUrl/lib/GetSatisfaction.pm index 75d5ece39..74951735b 100644 --- a/extensions/MoreBugUrl/lib/GetSatisfaction.pm +++ b/extensions/MoreBugUrl/lib/GetSatisfaction.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::GetSatisfaction; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/PHP.pm b/extensions/MoreBugUrl/lib/PHP.pm index ea090e865..6f201d7b1 100644 --- a/extensions/MoreBugUrl/lib/PHP.pm +++ b/extensions/MoreBugUrl/lib/PHP.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::PHP; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/RT.pm b/extensions/MoreBugUrl/lib/RT.pm index a1ca6fd88..acb90cf39 100644 --- a/extensions/MoreBugUrl/lib/RT.pm +++ b/extensions/MoreBugUrl/lib/RT.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::RT; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/Redmine.pm b/extensions/MoreBugUrl/lib/Redmine.pm index a1c1382ce..57a071239 100644 --- a/extensions/MoreBugUrl/lib/Redmine.pm +++ b/extensions/MoreBugUrl/lib/Redmine.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::Redmine; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/ReviewBoard.pm b/extensions/MoreBugUrl/lib/ReviewBoard.pm index 08128353f..af5ff0684 100644 --- a/extensions/MoreBugUrl/lib/ReviewBoard.pm +++ b/extensions/MoreBugUrl/lib/ReviewBoard.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::ReviewBoard; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/Rietveld.pm b/extensions/MoreBugUrl/lib/Rietveld.pm index a8bccba08..a4bf08492 100644 --- a/extensions/MoreBugUrl/lib/Rietveld.pm +++ b/extensions/MoreBugUrl/lib/Rietveld.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::Rietveld; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/MoreBugUrl/lib/Savane.pm b/extensions/MoreBugUrl/lib/Savane.pm index a8a439b41..efda1fa4f 100644 --- a/extensions/MoreBugUrl/lib/Savane.pm +++ b/extensions/MoreBugUrl/lib/Savane.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::MoreBugUrl::Savane; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::BugUrl); ############################### diff --git a/extensions/OldBugMove/Config.pm b/extensions/OldBugMove/Config.pm index a42567fee..681cbae2d 100644 --- a/extensions/OldBugMove/Config.pm +++ b/extensions/OldBugMove/Config.pm @@ -9,5 +9,7 @@ package Bugzilla::Extension::OldBugMove; use 5.10.1; use strict; +use warnings; + use constant NAME => 'OldBugMove'; __PACKAGE__->NAME; diff --git a/extensions/OldBugMove/Extension.pm b/extensions/OldBugMove/Extension.pm index b58ffe883..375707fd2 100644 --- a/extensions/OldBugMove/Extension.pm +++ b/extensions/OldBugMove/Extension.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::OldBugMove; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); use Bugzilla::Constants; use Bugzilla::Error; diff --git a/extensions/OldBugMove/lib/Params.pm b/extensions/OldBugMove/lib/Params.pm index c922e1faf..05e3ed277 100644 --- a/extensions/OldBugMove/lib/Params.pm +++ b/extensions/OldBugMove/lib/Params.pm @@ -9,6 +9,7 @@ package Bugzilla::Extension::OldBugMove::Params; use 5.10.1; use strict; +use warnings; use Bugzilla::Config::Common; diff --git a/extensions/Voting/Config.pm b/extensions/Voting/Config.pm index 812ede60f..97c44933e 100644 --- a/extensions/Voting/Config.pm +++ b/extensions/Voting/Config.pm @@ -9,6 +9,7 @@ package Bugzilla::Extension::Voting; use 5.10.1; use strict; +use warnings; use constant NAME => 'Voting'; diff --git a/extensions/Voting/Extension.pm b/extensions/Voting/Extension.pm index e54a2aab0..8009f16bb 100644 --- a/extensions/Voting/Extension.pm +++ b/extensions/Voting/Extension.pm @@ -9,6 +9,8 @@ package Bugzilla::Extension::Voting; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); use Bugzilla::Bug; diff --git a/extensions/create.pl b/extensions/create.pl index e2d3321b1..d4256694b 100755 --- a/extensions/create.pl +++ b/extensions/create.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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/importxml.pl b/importxml.pl index 05d863530..8750c63a1 100755 --- a/importxml.pl +++ b/importxml.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -12,6 +12,7 @@ use 5.10.1; use strict; +use warnings; ##################################################################### # @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/install-module.pl b/install-module.pl index a7359917d..365f10bbf 100755 --- a/install-module.pl +++ b/install-module.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/. diff --git a/jobqueue.pl b/jobqueue.pl index d538e4784..f6722467c 100755 --- a/jobqueue.pl +++ b/jobqueue.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/. @@ -8,6 +8,7 @@ use 5.10.1; use strict; +use warnings; use Cwd qw(abs_path); use File::Basename; diff --git a/jsonrpc.cgi b/jsonrpc.cgi index 0b56d57c1..2c93585b0 100755 --- a/jsonrpc.cgi +++ b/jsonrpc.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/migrate.pl b/migrate.pl index 0ce85fa15..eb2a84b59 100755 --- a/migrate.pl +++ b/migrate.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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use File::Basename; BEGIN { chdir dirname($0); } use lib qw(. lib); diff --git a/mod_perl.pl b/mod_perl.pl index 572bcc7f9..bdce744ca 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -112,6 +112,7 @@ package Bugzilla::ModPerl::ResponseHandler; use 5.10.1; use strict; +use warnings; use parent qw(ModPerl::Registry); use Bugzilla; @@ -148,6 +149,7 @@ package Bugzilla::ModPerl::CleanupHandler; use 5.10.1; use strict; +use warnings; use Apache2::Const -compile => qw(OK); @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -15,6 +15,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/post_bug.cgi b/post_bug.cgi index 782bb2293..4365352e7 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/process_bug.cgi b/process_bug.cgi index 389ee18d1..bc558682e 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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,20 +6,10 @@ # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. -# Implementation notes for this file: -# -# 1) the 'id' form parameter is validated early on, and if it is not a valid -# bugid an error will be reported, so it is OK for later code to simply check -# for a defined form 'id' value, and it can assume a valid bugid. -# -# 2) If the 'id' form parameter is not defined (after the initial validation), -# then we are processing multiple bugs, and @idlist will contain the ids. -# -# 3) If we are processing just the one id, then it is stored in @idlist for -# later processing. - use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/relogin.cgi b/relogin.cgi index 0c1cb9ad6..fd1f58ea0 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/report.cgi b/report.cgi index 4cfa6a6a4..a4d26f4d7 100755 --- a/report.cgi +++ b/report.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/reports.cgi b/reports.cgi index 1f1791e42..cdc9d4a87 100755 --- a/reports.cgi +++ b/reports.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/request.cgi b/request.cgi index 771a32074..566781a0c 100755 --- a/request.cgi +++ b/request.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/runtests.pl b/runtests.pl index 6a6450007..52de88e10 100755 --- a/runtests.pl +++ b/runtests.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/. @@ -9,6 +9,8 @@ use 5.10.1; use diagnostics; use strict; +use warnings; + use lib qw(lib); use Test::Harness qw(&runtests $verbose); diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 2f87fb828..889d7f3e6 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/sanitycheck.pl b/sanitycheck.pl index 819c66152..7fd12b176 100755 --- a/sanitycheck.pl +++ b/sanitycheck.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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/search_plugin.cgi b/search_plugin.cgi index e9b281ec2..7de8bed5f 100755 --- a/search_plugin.cgi +++ b/search_plugin.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/show_activity.cgi b/show_activity.cgi index 1383dd018..7df10fcb8 100755 --- a/show_activity.cgi +++ b/show_activity.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/show_bug.cgi b/show_bug.cgi index 95815f86b..f69cae740 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 6445b6175..02c8fd94f 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use File::Temp; diff --git a/showdependencytree.cgi b/showdependencytree.cgi index fb8a59cc3..9e193df02 100755 --- a/showdependencytree.cgi +++ b/showdependencytree.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/summarize_time.cgi b/summarize_time.cgi index 0d32d16e4..3bdf8ee52 100755 --- a/summarize_time.cgi +++ b/summarize_time.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Date::Parse; # strptime diff --git a/t/001compile.t b/t/001compile.t index af7793093..7097ad361 100644 --- a/t/001compile.t +++ b/t/001compile.t @@ -10,8 +10,10 @@ #Bugzilla Test 1# ###Compilation### -use strict; use 5.10.1; +use strict; +use warnings; + use lib qw(. lib t); use Config; use Support::Files; @@ -52,7 +54,7 @@ sub compile_file { $libs = join " ", map { "-I\"$_\"" } split /$Config{path_sep}/, $ENV{PERL5LIB}; } my $perl = qq{"$^X"}; - my $output = `$perl $libs -wc$T $file 2>&1`; + my $output = `$perl $libs -c$T $file 2>&1`; chomp($output); my $return_val = $?; $output =~ s/^\Q$file\E syntax OK$//ms; diff --git a/t/002goodperl.t b/t/002goodperl.t index 02a57bea1..e95870d70 100644 --- a/t/002goodperl.t +++ b/t/002goodperl.t @@ -10,15 +10,19 @@ #Bugzilla Test 2# ####GoodPerl##### +use 5.10.1; use strict; +use warnings; use lib 't'; use Support::Files; -use Test::More tests => (scalar(@Support::Files::testitems) * 4); +use Test::More tests => (scalar(@Support::Files::testitems) + + scalar(@Support::Files::test_files)) * 5; -my @testitems = @Support::Files::testitems; # get the files to test. +my @testitems = (@Support::Files::test_files, @Support::Files::testitems); +my @require_taint = qw(email_in.pl importxml.pl mod_perl.pl whine.pl); foreach my $file (@testitems) { $file =~ s/\s.*$//; # nuke everything after the first space (#comment) @@ -38,23 +42,33 @@ foreach my $file (@testitems) { my $flags; if (!defined $ext || $ext eq "pl") { # standalone programs aren't taint checked yet - $flags = "w"; + if (grep { $file eq $_ } @require_taint) { + $flags = 'T'; + } + else { + $flags = ''; + } } elsif ($ext eq "pm") { ok(0, "$file is a module, but has a shebang"); next; } elsif ($ext eq "cgi") { # cgi files must be taint checked - $flags = "wT"; + $flags = 'T'; } else { ok(0, "$file has shebang but unknown extension"); next; } - if ($file_line1 =~ m#^\#\!/usr/bin/perl\s#) { - if ($file_line1 =~ m#\s-$flags#) { - ok(1,"$file uses standard perl location and -$flags"); - } else { - ok(0,"$file is MISSING -$flags --WARNING"); + if ($file_line1 =~ m#^\#\!/usr/bin/perl(?:\s-(\w+))?$#) { + my $file_flags = $1 || ''; + if ($flags eq $file_flags) { + ok(1, "$file uses standard perl location" . ($flags ? " and -$flags flag" : "")); + } + elsif ($flags) { + ok(0, "$file is MISSING -$flags flag --WARNING"); + } + else { + ok(0, "$file has unexpected -$file_flags flag --WARNING"); } } else { ok(0,"$file uses non-standard perl location"); @@ -63,7 +77,10 @@ foreach my $file (@testitems) { } foreach my $file (@testitems) { + my $found_use_perl = 0; my $found_use_strict = 0; + my $found_use_warnings = 0; + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) next if (!$file); # skip null entries if (! open (FILE, $file)) { @@ -71,38 +88,28 @@ foreach my $file (@testitems) { next; } while (my $file_line = <FILE>) { - if ($file_line =~ m/^\s*use strict/) { - $found_use_strict = 1; - last; - } + $found_use_perl = 1 if $file_line =~ m/^\s*use 5.10.1/; + $found_use_strict = 1 if $file_line =~ m/^\s*use strict/; + $found_use_warnings = 1 if $file_line =~ m/^\s*use warnings/; + last if ($found_use_perl && $found_use_strict && $found_use_warnings); } close (FILE); + if ($found_use_perl) { + ok(1,"$file requires Perl 5.10.1"); + } else { + ok(0,"$file DOES NOT require Perl 5.10.1 --WARNING"); + } + if ($found_use_strict) { ok(1,"$file uses strict"); } else { ok(0,"$file DOES NOT use strict --WARNING"); } -} -foreach my $file (@testitems) { - my $found_use_feature = 0; - $file =~ s/\s.*$//; # nuke everything after the first space (#comment) - next if (!$file); # skip null entries - if (! open (FILE, $file)) { - ok(0,"could not open $file --WARNING"); - next; - } - while (my $file_line = <FILE>) { - if ($file_line =~ m/^\s*use 5.10.1/) { - $found_use_feature = 1; - last; - } - } - close (FILE); - if ($found_use_feature) { - ok(1,"$file requires Perl 5.10.1"); + if ($found_use_warnings) { + ok(1,"$file uses warnings"); } else { - ok(0,"$file DOES NOT require Perl 5.10.1 --WARNING"); + ok(0,"$file DOES NOT use warnings --WARNING"); } } diff --git a/t/003safesys.t b/t/003safesys.t index 0d6a215b1..2a257ffb9 100644 --- a/t/003safesys.t +++ b/t/003safesys.t @@ -10,7 +10,9 @@ #Bugzilla Test 3# ###Safesystem#### +use 5.10.1; use strict; +use warnings; use lib 't'; @@ -22,7 +24,7 @@ use Test::More tests => scalar(@Support::Files::testitems); # This will handle verbosity for us automatically. my $fh; { - local $^W = 0; # Don't complain about non-existent filehandles + no warnings qw(unopened); # Don't complain about non-existent filehandles if (-e \*Test::More::TESTOUT) { $fh = \*Test::More::TESTOUT; } elsif (-e \*Test::Builder::TESTOUT) { diff --git a/t/004template.t b/t/004template.t index 604559dc0..d38f9e16b 100644 --- a/t/004template.t +++ b/t/004template.t @@ -9,7 +9,9 @@ #Bugzilla Test 4# ####Templates#### +use 5.10.1; use strict; +use warnings; use lib 't'; @@ -26,7 +28,7 @@ use Test::More tests => ( scalar(@referenced_files) + 2 * $num_actual_files ); # This will handle verbosity for us automatically. my $fh; { - local $^W = 0; # Don't complain about non-existent filehandles + no warnings qw(unopened); # Don't complain about non-existent filehandles if (-e \*Test::More::TESTOUT) { $fh = \*Test::More::TESTOUT; } elsif (-e \*Test::Builder::TESTOUT) { diff --git a/t/005whitespace.t b/t/005whitespace.t index 8cb2f7e8f..b6de8cee3 100644 --- a/t/005whitespace.t +++ b/t/005whitespace.t @@ -9,7 +9,9 @@ #Bugzilla Test 5# #####no_tabs##### +use 5.10.1; use strict; +use warnings; use lib 't'; diff --git a/t/006spellcheck.t b/t/006spellcheck.t index 7f17c5169..24e00242d 100644 --- a/t/006spellcheck.t +++ b/t/006spellcheck.t @@ -10,29 +10,13 @@ #Bugzilla Test 6# ####Spelling##### +use 5.10.1; +use strict; +use warnings; + use lib 't'; use Support::Files; -BEGIN { - #add the words to check here: - @evilwords = qw( - anyways - appearence - arbitary - cancelled - critera - databasa - dependan - existance - existant - paramater - refered - repsentation - suported - varsion - ); -} - # -1 because 006spellcheck.t must not be checked. use Test::More tests => scalar(@Support::Files::testitems) + scalar(@Support::Files::test_files) - 1; @@ -41,7 +25,7 @@ use Test::More tests => scalar(@Support::Files::testitems) # This will handle verbosity for us automatically. my $fh; { - local $^W = 0; # Don't complain about non-existent filehandles + no warnings qw(unopened); # Don't complain about non-existent filehandles if (-e \*Test::More::TESTOUT) { $fh = \*Test::More::TESTOUT; } elsif (-e \*Test::Builder::TESTOUT) { @@ -53,7 +37,24 @@ my $fh; my @testitems = (@Support::Files::testitems, @Support::Files::test_files); -# at last, here we actually run the test... +#add the words to check here: +my @evilwords = qw( + anyways + appearence + arbitary + cancelled + critera + databasa + dependan + existance + existant + paramater + refered + repsentation + suported + varsion +); + my $evilwordsregexp = join('|', @evilwords); foreach my $file (@testitems) { diff --git a/t/007util.t b/t/007util.t index 495102ffa..66c2df032 100644 --- a/t/007util.t +++ b/t/007util.t @@ -9,14 +9,18 @@ #Bugzilla Test 7# #####Util.pm##### +use 5.10.1; +use strict; +use warnings; + use lib 't'; use Support::Files; use Test::More tests => 17; use DateTime; BEGIN { - use_ok(Bugzilla); - use_ok(Bugzilla::Util); + use_ok('Bugzilla'); + use_ok('Bugzilla::Util'); } # We need to override user preferences so we can get an expected value when diff --git a/t/008filter.t b/t/008filter.t index 9551ae2b2..f0a26d13f 100644 --- a/t/008filter.t +++ b/t/008filter.t @@ -15,10 +15,11 @@ # Sample exploit code: '>"><script>alert('Oh dear...')</script> +use 5.10.1; use strict; -use lib qw(. lib t); +use warnings; -use vars qw(%safe); +use lib qw(. lib t); use Bugzilla::Constants; use Support::Templates; @@ -30,6 +31,7 @@ use Cwd; my $oldrecsep = $/; my $topdir = cwd; $/ = undef; +our %safe; foreach my $path (@Support::Templates::include_paths) { $path =~ s|\\|/|g if ON_WINDOWS; # convert \ to / in path if on windows @@ -84,9 +86,9 @@ foreach my $path (@Support::Templates::include_paths) { ok(1, "($lang/$flavor) $file is filter-safe"); next; } - + # Read the entire file into a string - open (FILE, "<$file") || die "Can't open $file: $!\n"; + open (FILE, "<$file") || die "Can't open $file: $!\n"; my $slurp = <FILE>; close (FILE); diff --git a/t/009bugwords.t b/t/009bugwords.t index 988f747f2..e36651edb 100644 --- a/t/009bugwords.t +++ b/t/009bugwords.t @@ -15,7 +15,9 @@ # "[% terms.bug %]". This test makes sure the relevant words aren't used # bare. +use 5.10.1; use strict; +use warnings; use lib 't'; diff --git a/t/010dependencies.t b/t/010dependencies.t index 89a26ba5e..afd29a652 100644 --- a/t/010dependencies.t +++ b/t/010dependencies.t @@ -10,7 +10,10 @@ #Bugzilla Test 10# ## dependencies ## +use 5.10.1; use strict; +use warnings; + use lib qw(. lib t); use Support::Files; diff --git a/t/011pod.t b/t/011pod.t index fc66bca63..588db1fc5 100644 --- a/t/011pod.t +++ b/t/011pod.t @@ -10,7 +10,9 @@ #Bugzilla Test 11# ##POD validation## +use 5.10.1; use strict; +use warnings; use lib 't'; @@ -52,7 +54,7 @@ use constant MODULE_WHITELIST => qw( # This will handle verbosity for us automatically. my $fh; { - local $^W = 0; # Don't complain about non-existent filehandles + no warnings qw(unopened); # Don't complain about non-existent filehandles if (-e \*Test::More::TESTOUT) { $fh = \*Test::More::TESTOUT; } elsif (-e \*Test::Builder::TESTOUT) { diff --git a/t/012throwables.t b/t/012throwables.t index 7600cbd02..0ef043fa5 100644 --- a/t/012throwables.t +++ b/t/012throwables.t @@ -11,7 +11,10 @@ #Bugzilla Test 12# ######Errors###### +use 5.10.1; use strict; +use warnings; + use lib qw(. lib t); use Bugzilla::Constants; diff --git a/t/013dbschema.t b/t/013dbschema.t index c1f9c7f0c..217176ff2 100644 --- a/t/013dbschema.t +++ b/t/013dbschema.t @@ -12,7 +12,10 @@ # Check the Bugzilla database schema to ensure no field names conflict # with SQL reserved words. +use 5.10.1; use strict; +use warnings; + use lib qw(. t lib); use Bugzilla; use Bugzilla::DB::Schema; diff --git a/t/Support/Files.pm b/t/Support/Files.pm index 330a473b1..85fa9f583 100644 --- a/t/Support/Files.pm +++ b/t/Support/Files.pm @@ -8,15 +8,19 @@ package Support::Files; +use 5.10.1; +use strict; +use warnings; + use File::Find; -@additional_files = (); +our @additional_files = (); -@files = glob('*'); +our @files = glob('*'); find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'Bugzilla'); push(@files, 'extensions/create.pl'); -@extensions = +our @extensions = grep { $_ ne 'extensions/create.pl' && ! -e "$_/disabled" } glob('extensions/*'); @@ -24,7 +28,7 @@ foreach my $extension (@extensions) { find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, $extension); } -@test_files = glob('t/*.t'); +our @test_files = glob('t/*.t'); sub isTestingFile { my ($file) = @_; @@ -40,9 +44,11 @@ sub isTestingFile { return undef; } -foreach $currentfile (@files) { +our (@testitems, @module_files); + +foreach my $currentfile (@files) { if (isTestingFile($currentfile)) { - push(@testitems,$currentfile); + push(@testitems, $currentfile); } push(@module_files, $currentfile) if $currentfile =~ /\.pm$/; } diff --git a/t/Support/Systemexec.pm b/t/Support/Systemexec.pm index 620cce25e..65be229e3 100644 --- a/t/Support/Systemexec.pm +++ b/t/Support/Systemexec.pm @@ -6,6 +6,11 @@ # defined by the Mozilla Public License, v. 2.0. package Support::Systemexec; + +use 5.10.1; +use strict; +use warnings; + require Exporter; @ISA = qw(Exporter); @EXPORT = qw(system exec); diff --git a/t/Support/Templates.pm b/t/Support/Templates.pm index 2185d687f..d17c7334b 100644 --- a/t/Support/Templates.pm +++ b/t/Support/Templates.pm @@ -7,15 +7,15 @@ package Support::Templates; +use 5.10.1; use strict; +use warnings; use lib 't'; use parent qw(Exporter); -@Support::Templates::EXPORT = - qw(@languages @include_paths @english_default_include_paths - %include_path @referenced_files %actual_files $num_actual_files); -use vars qw(@languages @include_paths @english_default_include_paths - %include_path @referenced_files %actual_files $num_actual_files); +@Support::Templates::EXPORT = + qw(@languages @include_paths @english_default_include_paths + @referenced_files %actual_files $num_actual_files); use Bugzilla; use Bugzilla::Constants; @@ -25,18 +25,9 @@ use Support::Files; use File::Find; use File::Spec; -# The available template languages -@languages = (); - -# The colon separated includepath per language -%include_path = (); - -# All include paths -@include_paths = (); - # English default include paths -push @english_default_include_paths, - File::Spec->catdir(bz_locations()->{'templatedir'}, 'en', 'default'); +our @english_default_include_paths = + (File::Spec->catdir(bz_locations()->{'templatedir'}, 'en', 'default')); # And the extensions too foreach my $extension (@Support::Files::extensions) { @@ -47,19 +38,19 @@ foreach my $extension (@Support::Files::extensions) { } # Files which are referenced in the cgi files -@referenced_files = (); +our @referenced_files = (); # All files sorted by include_path -%actual_files = (); +our %actual_files = (); # total number of actual_files -$num_actual_files = 0; +our $num_actual_files = 0; # Set the template available languages and include paths -@languages = @{ Bugzilla->languages }; -@include_paths = @{ template_include_path({ language => Bugzilla->languages }) }; +our @languages = @{ Bugzilla->languages }; +our @include_paths = @{ template_include_path({ language => Bugzilla->languages }) }; -my @files; +our @files; # Local subroutine used with File::Find sub find_templates { diff --git a/template/en/default/extensions/config.pm.tmpl b/template/en/default/extensions/config.pm.tmpl index 79fbb995c..68ed260c1 100644 --- a/template/en/default/extensions/config.pm.tmpl +++ b/template/en/default/extensions/config.pm.tmpl @@ -16,6 +16,7 @@ package Bugzilla::Extension::[% name %]; use 5.10.1; use strict; +use warnings; use constant NAME => '[% name %]'; diff --git a/template/en/default/extensions/extension.pm.tmpl b/template/en/default/extensions/extension.pm.tmpl index 637dfdd28..823440421 100644 --- a/template/en/default/extensions/extension.pm.tmpl +++ b/template/en/default/extensions/extension.pm.tmpl @@ -16,6 +16,8 @@ package Bugzilla::Extension::[% name %]; use 5.10.1; use strict; +use warnings; + use parent qw(Bugzilla::Extension); # This code for this is in [% path %]/lib/Util.pm diff --git a/template/en/default/extensions/util.pm.tmpl b/template/en/default/extensions/util.pm.tmpl index a5fbde04d..3baab57fd 100644 --- a/template/en/default/extensions/util.pm.tmpl +++ b/template/en/default/extensions/util.pm.tmpl @@ -16,6 +16,8 @@ package Bugzilla::Extension::[% name %]::Util; use 5.10.1; use strict; +use warnings; + use parent qw(Exporter); our @EXPORT = qw( diff --git a/testagent.cgi b/testagent.cgi index c3220cab5..d9d5afd1a 100755 --- a/testagent.cgi +++ b/testagent.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -12,6 +12,7 @@ use 5.10.1; use strict; +use warnings; say "content-type:text/plain\n"; say "OK " . ($::ENV{MOD_PERL} || "mod_cgi"); diff --git a/testserver.pl b/testserver.pl index f00f551f9..eeb783592 100755 --- a/testserver.pl +++ b/testserver.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/. @@ -12,6 +12,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/userprefs.cgi b/userprefs.cgi index f798d4c76..bb57b56b3 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -11,6 +11,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -12,6 +12,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/whineatnews.pl b/whineatnews.pl index c81381162..4812b4cfe 100755 --- a/whineatnews.pl +++ b/whineatnews.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/. @@ -16,6 +16,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; diff --git a/xmlrpc.cgi b/xmlrpc.cgi index 5fff5f7e1..893bfba5d 100755 --- a/xmlrpc.cgi +++ b/xmlrpc.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -T # 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/. @@ -8,6 +8,8 @@ use 5.10.1; use strict; +use warnings; + use lib qw(. lib); use Bugzilla; |