summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d48b284)
raw | patch | inline | side by side (parent: d48b284)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Fri, 24 Sep 2010 20:00:53 +0000 (20:00 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Sep 2010 19:37:56 +0000 (12:37 -0700) |
Change the Perl scripts to turn on lexical warnings instead of setting
the global $^W variable via the -w switch.
The -w sets warnings for all code that interpreter runs, while "use
warnings" is lexically scoped. The former is probably not what the
authors wanted.
As an auxiliary benefit it's now possible to build Git with:
PERL_PATH='/usr/bin/env perl'
Which would previously result in failures, since "#!/usr/bin/env perl -w"
doesn't work as a shebang.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the global $^W variable via the -w switch.
The -w sets warnings for all code that interpreter runs, while "use
warnings" is lexically scoped. The former is probably not what the
authors wanted.
As an auxiliary benefit it's now possible to build Git with:
PERL_PATH='/usr/bin/env perl'
Which would previously result in failures, since "#!/usr/bin/env perl -w"
doesn't work as a shebang.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index 4576c4a862c8ea0565a67eccdae6ef1ac4d9af9a..ead4c04d3f7ca64ed55ff605d7ee8087189a2226 100755 (executable)
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# This tool is copyright (c) 2005, Matthias Urlichs.
# It is released under the Gnu Public License, version 2.
diff --git a/contrib/fast-import/import-directories.perl b/contrib/fast-import/import-directories.perl
index 3a5da4ab00f2e29c3244611f40d776293e796e7d..7f3afa5ac4a4ca979a4e5dd63ebc59344f20857b 100755 (executable)
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# Copyright 2008-2009 Peter Krefting <peter@softwolves.pp.se>
#
# Globals
use strict;
+use warnings;
use integer;
my $crlfmode = 0;
my @revs;
index a96fb53156214177701c12f8995b277059e55ebd..77f60fa3960323e412f8d09968e63865cc639298 100755 (executable)
-#!/usr/bin/perl -w
+#!/usr/bin/perl
use 5.008;
use strict;
+use warnings;
use Git;
binmode(STDOUT, ":raw");
diff --git a/git-archimport.perl b/git-archimport.perl
index 947638c38d8a4cf0e5df53d5a4890f141cc393f8..bc32f18d6d9cbf915eb7797817390adbbc111506 100755 (executable)
--- a/git-archimport.perl
+++ b/git-archimport.perl
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# This tool is copyright (c) 2005, Martin Langhoff.
# It is released under the Gnu Public License, version 2.
index 9a8188bba785ad68d47ec7b277b016ee76e46f4c..39a426e067c76e01d3f2a0d63243ec494436da46 100755 (executable)
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
-#!/usr/bin/perl -w
+#!/usr/bin/perl
use 5.008;
use strict;
+use warnings;
use Getopt::Std;
use File::Temp qw(tempdir);
use Data::Dumper;
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 53869fb644c24cca17ccfef73d31cbc5fe8578bd..249aeaf17557c4b8f05fdd5f1df5c16d65f0f84c 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# This tool is copyright (c) 2005, Matthias Urlichs.
# It is released under the Gnu Public License, version 2.
diff --git a/git-send-email.perl b/git-send-email.perl
index 314e59e7a9f14d8bf1106cf5f5dd73da65f30905..d10d869912c187868018e5a7b9d97bad51073b64 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# Copyright 2002,2005 Greg Kroah-Hartman <greg@kroah.com>
# Copyright 2005 Ryan Anderson <ryan@michonline.com>