[devscripts] 01/05: Remove -w from perl #!

James McCoy jamessan at debian.org
Tue Jun 9 02:35:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 5d5d59a696f9361ac349f3dd392d197d4869769f
Author: James McCoy <jamessan at debian.org>
Date:   Sun Jun 7 00:46:07 2015 -0400

    Remove -w from perl #!
    
    Use the lexically scoped “use warnings;” pragma instead.  Also add “use
    strict;” to any affected files which were lacking it.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 lib/Devscripts/Packages.pm  | 5 ++++-
 scripts/bts.pl              | 3 ++-
 scripts/checkbashisms.pl    | 3 ++-
 scripts/cvs-debuild.pl      | 3 ++-
 scripts/dcontrol.pl         | 3 ++-
 scripts/dd-list.pl          | 3 ++-
 scripts/debdiff.pl          | 3 ++-
 scripts/debi.pl             | 3 ++-
 scripts/debpkg.pl           | 6 ++++--
 scripts/desktop2menu.pl     | 2 +-
 scripts/dget.pl             | 3 ++-
 scripts/dpkg-depcheck.pl    | 3 ++-
 scripts/dscverify.pl        | 3 ++-
 scripts/grep-excuses.pl     | 3 ++-
 scripts/mass-bug.pl         | 3 ++-
 scripts/namecheck.pl        | 2 +-
 scripts/rmadison.pl         | 3 ++-
 scripts/tagpending.pl       | 2 +-
 scripts/transition-check.pl | 2 +-
 scripts/uscan.pl            | 3 ++-
 20 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/lib/Devscripts/Packages.pm b/lib/Devscripts/Packages.pm
index b321e2f..96b9859 100644
--- a/lib/Devscripts/Packages.pm
+++ b/lib/Devscripts/Packages.pm
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/perl
 
 # Copyright Bill Allombert <ballombe at debian.org> 2001.
 # Modifications copyright 2002 Julian Gilbey <jdg at debian.org>
@@ -18,6 +18,8 @@
 
 package Devscripts::Packages;
 
+use strict;
+use warnings;
 use Carp;
 use Dpkg::Control;
 
@@ -262,6 +264,7 @@ sub InstalledPackages ($)
 	or croak("Can't read /var/lib/dpkg/status: $!");
 
     my $ctrl;
+    my %matches;
     while (defined($ctrl = Dpkg::Control->new(type => CTRL_FILE_STATUS))
 	   && $ctrl->parse(\*STATUS, '/var/lib/dpkg/status')) {
 	if ($ctrl->{Status} !~ /^install\s+ok\s+installed$/) {
diff --git a/scripts/bts.pl b/scripts/bts.pl
index 8ea45ea..37aafb0 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # bts: This program provides a convenient interface to the Debian
 # Bug Tracking System.
@@ -44,6 +44,7 @@ bts - developers' command line interface to the BTS
 
 use 5.006_000;
 use strict;
+use warnings;
 use File::Basename;
 use File::Copy;
 use File::Path qw(mkpath make_path rmtree);
diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 640afe5..9c9500b 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # This script is essentially copied from /usr/share/lintian/checks/scripts,
 # which is:
@@ -21,6 +21,7 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 
 use strict;
+use warnings;
 use Getopt::Long qw(:config gnu_getopt);
 use File::Temp qw/tempfile/;
 
diff --git a/scripts/cvs-debuild.pl b/scripts/cvs-debuild.pl
index 0e19221..cf273db 100755
--- a/scripts/cvs-debuild.pl
+++ b/scripts/cvs-debuild.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # A wrapper for cvs-buildpackage to use debuild, still giving access
 # to all of debuild's functionality.
@@ -32,6 +32,7 @@
 
 use 5.006;
 use strict;
+use warnings;
 use FileHandle;
 use File::Basename;
 use File::Temp qw/ tempfile /;
diff --git a/scripts/dcontrol.pl b/scripts/dcontrol.pl
index 8767923..f154b02 100755
--- a/scripts/dcontrol.pl
+++ b/scripts/dcontrol.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # vim:sw=4:sta:
 
 #   dcontrol - Query Debian control files across releases and architectures
@@ -19,6 +19,7 @@
 #   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 use strict;
+use warnings;
 use File::Basename;
 use Getopt::Long qw(:config gnu_getopt);
 
diff --git a/scripts/dd-list.pl b/scripts/dd-list.pl
index 94a9c01..74cdf54 100755
--- a/scripts/dd-list.pl
+++ b/scripts/dd-list.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 #
 # dd-list: Generate a list of maintainers of packages.
 #
@@ -21,6 +21,7 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 
 use strict;
+use warnings;
 use FileHandle;
 use Getopt::Long qw(:config gnu_getopt);
 
diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index 2b98f51..2eff196 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # Original shell script version:
 # Copyright 1998,1999 Yann Dirson <dirson at debian.org>
@@ -16,6 +16,7 @@
 
 use 5.006_000;
 use strict;
+use warnings;
 use Cwd;
 use Dpkg::IPC;
 use File::Copy qw(cp move);
diff --git a/scripts/debi.pl b/scripts/debi.pl
index f4841bd..6e6fe13 100755
--- a/scripts/debi.pl
+++ b/scripts/debi.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # debi:  Install current version of deb package
 # debc:  List contents of current version of deb package
@@ -25,6 +25,7 @@
 
 use 5.008;
 use strict;
+use warnings;
 use Getopt::Long qw(:config gnu_getopt);
 use File::Basename;
 use filetest 'access';
diff --git a/scripts/debpkg.pl b/scripts/debpkg.pl
index f72be2e..fed21c5 100755
--- a/scripts/debpkg.pl
+++ b/scripts/debpkg.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # Perl version of Christoph Lameter's debpkg program.
 # Written by Julian Gilbey, December 1998.
@@ -31,6 +31,8 @@
 # get any unexpected behaviour.
 
 use 5.003;
+use strict;
+use warnings;
 use File::Basename;
 
 my $progname = basename($0);
@@ -60,7 +62,7 @@ if ($ARGV[0] eq '--version') { print $version; exit 0; }
 # them, and anyone running this with root privileges has total power
 # over the system anyway, so doesn't really need to worry about forging
 # locale data.  We don't try to preserve TEXTDOMAIN and the like.
-foreach $var (keys %ENV) {
+foreach my $var (keys %ENV) {
 	delete $ENV{$var} unless
 		$var =~ /^(PATH|TERM|HOME|LOGNAME|LANG)$/ or
 			$var =~ /^LC_[A-Z]+$/;
diff --git a/scripts/desktop2menu.pl b/scripts/desktop2menu.pl
index f97551d..47261ea 100755
--- a/scripts/desktop2menu.pl
+++ b/scripts/desktop2menu.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # desktop2menu: This program generates a skeleton menu file from a
 # freedesktop.org desktop file
diff --git a/scripts/dget.pl b/scripts/dget.pl
index 45af642..8227eab 100755
--- a/scripts/dget.pl
+++ b/scripts/dget.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # vim:sw=4:sta:
 
 #   dget - Download Debian source and binary packages
@@ -27,6 +27,7 @@
 # Later modifications: see debian/changelog
 
 use strict;
+use warnings;
 use Cwd qw(abs_path);
 use IO::Dir;
 use IO::File;
diff --git a/scripts/dpkg-depcheck.pl b/scripts/dpkg-depcheck.pl
index dec139a..3c1ac80 100755
--- a/scripts/dpkg-depcheck.pl
+++ b/scripts/dpkg-depcheck.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # Copyright Bill Allombert <ballombe at debian.org> 2001.
 # Modifications copyright 2002-2005 Julian Gilbey <jdg at debian.org>
@@ -17,6 +17,7 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 
 use strict;
+use warnings;
 use 5.006_000;  # our() commands
 use Cwd;
 use File::Basename;
diff --git a/scripts/dscverify.pl b/scripts/dscverify.pl
index 95768c0..ff2436e 100755
--- a/scripts/dscverify.pl
+++ b/scripts/dscverify.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # This program takes .changes or .dsc files as arguments and verifies
 # that they're properly signed by a Debian developer, and that the local
@@ -23,6 +23,7 @@
 
 use 5.004;	# correct pipe close behavior
 use strict;
+use warnings;
 use Cwd;
 use Fcntl;
 use Dpkg::IPC;
diff --git a/scripts/grep-excuses.pl b/scripts/grep-excuses.pl
index 10c9322..c856f62 100755
--- a/scripts/grep-excuses.pl
+++ b/scripts/grep-excuses.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # Grep debian testing excuses file.
 #
 # Copyright 2002 Joey Hess <joeyh at debian.org>
@@ -20,6 +20,7 @@
 
 use 5.006;
 use strict;
+use warnings;
 use File::Basename;
 
 # Needed for --wipnity option
diff --git a/scripts/mass-bug.pl b/scripts/mass-bug.pl
index acc7f50..6ef3948 100755
--- a/scripts/mass-bug.pl
+++ b/scripts/mass-bug.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # mass-bug: mass-file a bug report against a list of packages
 # For options, see the usage message below.
@@ -149,6 +149,7 @@ F</usr/sbin/sendmail>.  Same as the B<--sendmail> command line option.
 =cut
 
 use strict;
+use warnings;
 use Getopt::Long qw(:config gnu_getopt);
 use Text::Wrap;
 use File::Basename;
diff --git a/scripts/namecheck.pl b/scripts/namecheck.pl
index b6a2d17..e14f2fd 100755
--- a/scripts/namecheck.pl
+++ b/scripts/namecheck.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 =head1 NAME
 
diff --git a/scripts/rmadison.pl b/scripts/rmadison.pl
index 811aa48..bae237e 100755
--- a/scripts/rmadison.pl
+++ b/scripts/rmadison.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # vim:sw=4:sta:
 
 # Copyright (C) 2006-2013 Christoph Berg <myon at debian.org>
@@ -19,6 +19,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
 use strict;
+use warnings;
 use File::Basename;
 use Getopt::Long qw(:config gnu_getopt);
 
diff --git a/scripts/tagpending.pl b/scripts/tagpending.pl
index 0b1ba2c..9db77f5 100755
--- a/scripts/tagpending.pl
+++ b/scripts/tagpending.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 #
 # tagpending: Parse a Debian changelog for a list of bugs closed
 # and tag any that are not already pending as such.
diff --git a/scripts/transition-check.pl b/scripts/transition-check.pl
index 5639a40..5475950 100755
--- a/scripts/transition-check.pl
+++ b/scripts/transition-check.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 # transition-check: Check whether a given source package is involved
 # in a current transition for which uploads have been blocked by the
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 2dc66a2..fdc4f77 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 # -*- tab-width: 8; indent-tabs-mode: t; cperl-indent-level: 4 -*-
 
 # uscan: This program looks for watchfiles and checks upstream ftp sites
@@ -24,6 +24,7 @@
 
 use 5.008;  # uses 'our' variables and filetest
 use strict;
+use warnings;
 use Cwd;
 use Cwd 'abs_path';
 use Dpkg::IPC;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list