git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pat Pannuto <pat.pannuto@gmail.com>
To: gitster@pobox.com, git@vger.kernel.org
Cc: Pat Pannuto <pat.pannuto@gmail.com>
Subject: [PATCH 1/2] Convert all 'perl -w' to 'perl' + 'use warnings;'
Date: Thu, 12 Jan 2017 00:51:39 -0500	[thread overview]
Message-ID: <20170112055140.29877-2-pat.pannuto@gmail.com> (raw)
In-Reply-To: <20170112055140.29877-1-pat.pannuto@gmail.com>

This commit is in preparation for converting all shebangs to use 'env'
instead of a fixed perl path, which will not allow for arguments to 'perl'.

Signed-off-by: Pat Pannuto <pat.pannuto@gmail.com>
---
 Documentation/cat-texi.perl       | 4 +++-
 Documentation/cmd-list.perl       | 4 +++-
 Documentation/fix-texi.perl       | 4 +++-
 compat/vcbuild/scripts/clink.pl   | 3 ++-
 compat/vcbuild/scripts/lib.pl     | 3 ++-
 contrib/buildsystems/engine.pl    | 3 ++-
 contrib/buildsystems/generate     | 3 ++-
 contrib/buildsystems/parse.pl     | 3 ++-
 contrib/examples/git-remote.perl  | 3 ++-
 contrib/mw-to-git/t/test-gitmw.pl | 5 ++++-
 10 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/Documentation/cat-texi.perl b/Documentation/cat-texi.perl
index 87437f8a9..1cd28b1b5 100755
--- a/Documentation/cat-texi.perl
+++ b/Documentation/cat-texi.perl
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use warnings;
 
 my @menu = ();
 my $output = $ARGV[0];
diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl
index 5aa73cfe4..ba640a441 100755
--- a/Documentation/cmd-list.perl
+++ b/Documentation/cmd-list.perl
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use warnings;
 
 use File::Compare qw(compare);
 
diff --git a/Documentation/fix-texi.perl b/Documentation/fix-texi.perl
index ff7d78f62..c247aece7 100755
--- a/Documentation/fix-texi.perl
+++ b/Documentation/fix-texi.perl
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use warnings;
 
 while (<>) {
 	if (/^\@setfilename/) {
diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl
index a87d0da51..46eb61c5c 100755
--- a/compat/vcbuild/scripts/clink.pl
+++ b/compat/vcbuild/scripts/clink.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 ######################################################################
 # Compiles or links files
 #
@@ -10,6 +10,7 @@
 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
 ######################################################################
 use strict;
+use warnings;
 my @args = ();
 my @cflags = ();
 my $is_linking = 0;
diff --git a/compat/vcbuild/scripts/lib.pl b/compat/vcbuild/scripts/lib.pl
index d8054e469..e571b8470 100755
--- a/compat/vcbuild/scripts/lib.pl
+++ b/compat/vcbuild/scripts/lib.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 ######################################################################
 # Libifies files on Windows
 #
@@ -10,6 +10,7 @@
 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
 ######################################################################
 use strict;
+use warnings;
 my @args = ();
 while (@ARGV) {
 	my $arg = shift @ARGV;
diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 23da787dc..a173669ce 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 ######################################################################
 # Do not call this script directly!
 #
@@ -8,6 +8,7 @@
 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
 ######################################################################
 use strict;
+use warnings;
 use File::Basename;
 use File::Spec;
 use Cwd;
diff --git a/contrib/buildsystems/generate b/contrib/buildsystems/generate
index bc10f25ff..9af89454a 100755
--- a/contrib/buildsystems/generate
+++ b/contrib/buildsystems/generate
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 ######################################################################
 # Generate buildsystem files
 #
@@ -19,6 +19,7 @@
 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
 ######################################################################
 use strict;
+use warnings;
 use File::Basename;
 use Cwd;
 
diff --git a/contrib/buildsystems/parse.pl b/contrib/buildsystems/parse.pl
index c9656ece9..33ca89eb0 100755
--- a/contrib/buildsystems/parse.pl
+++ b/contrib/buildsystems/parse.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 ######################################################################
 # Do not call this script directly!
 #
@@ -8,6 +8,7 @@
 # Copyright (C) 2009 Marius Storm-Olsen <mstormo@gmail.com>
 ######################################################################
 use strict;
+use warnings;
 use File::Basename;
 use Cwd;
 
diff --git a/contrib/examples/git-remote.perl b/contrib/examples/git-remote.perl
index d42df7b41..5bf3ffd4c 100755
--- a/contrib/examples/git-remote.perl
+++ b/contrib/examples/git-remote.perl
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 use Git;
 my $git = Git->repository();
 
diff --git a/contrib/mw-to-git/t/test-gitmw.pl b/contrib/mw-to-git/t/test-gitmw.pl
index 0ff76259f..8d0e7c078 100755
--- a/contrib/mw-to-git/t/test-gitmw.pl
+++ b/contrib/mw-to-git/t/test-gitmw.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w -s
+#!/usr/bin/perl
 # Copyright (C) 2012
 #     Charles Roussel <charles.roussel@ensimag.imag.fr>
 #     Simon Cathebras <simon.cathebras@ensimag.imag.fr>
@@ -22,6 +22,9 @@
 #     "edit_page"
 #     "getallpagename"
 
+use strict;
+use warnings;
+
 use MediaWiki::API;
 use Getopt::Long;
 use encoding 'utf8';
-- 
2.11.0


  reply	other threads:[~2017-01-12  6:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  5:51 [PATCH 0/2] Use env for all perl invocations Pat Pannuto
2017-01-12  5:51 ` Pat Pannuto [this message]
2017-01-12  5:51 ` [PATCH 2/2] Use 'env' to find perl instead of fixed path Pat Pannuto
2017-01-12  6:27   ` Johannes Sixt
2017-01-12  7:17     ` Pat Pannuto
2017-01-12 10:21       ` Johannes Schindelin
2017-01-12 20:40         ` Junio C Hamano
2017-01-12 21:01           ` Pat Pannuto
2017-01-12 21:49             ` Junio C Hamano
2017-01-13  2:48             ` Eric Wong
2017-01-13 15:27               ` Johannes Schindelin
2017-01-13 16:58                 ` Eric Wong
2017-01-13 17:13                   ` Johannes Schindelin
2017-01-13 18:27               ` Junio C Hamano
2017-01-13 18:52                 ` Eric Wong
2017-01-13 20:01                   ` Junio C Hamano
2017-01-13 21:39                     ` Eric Wong
2017-01-14  7:54                   ` Jeff King
2017-01-14 10:31                     ` Eric Wong
2017-01-14 21:57                       ` brian m. carlson
2017-01-13 15:21             ` Johannes Schindelin
2017-01-12  6:21 ` [PATCH 0/2] Use env for all perl invocations Junio C Hamano
2017-01-12  7:13   ` Pat Pannuto
2017-01-12  8:21     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112055140.29877-2-pat.pannuto@gmail.com \
    --to=pat.pannuto@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).