unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] #!/usr/bin/perl -> #!/usr/bin/env perl
@ 2019-09-24 20:43 Alyssa Ross
  2019-09-26  2:49 ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Alyssa Ross @ 2019-09-24 20:43 UTC (permalink / raw)
  To: meta; +Cc: Alyssa Ross

It's much more reasonable to assume that the Perl a user wants to use
is the one they have in their path, rather than whatever one has been
installed system-wide by their distribution (if any!).
---
 Documentation/extman.perl     | 3 ++-
 Documentation/standards.perl  | 3 ++-
 Makefile.PL                   | 3 ++-
 certs/create-certs.perl       | 2 +-
 ci/deps.perl                  | 3 ++-
 examples/cgit.psgi            | 2 +-
 examples/highlight.psgi       | 2 +-
 examples/newswww.psgi         | 2 +-
 examples/public-inbox.psgi    | 2 +-
 examples/unsubscribe.milter   | 2 +-
 examples/unsubscribe.psgi     | 3 ++-
 script/public-inbox-compact   | 2 +-
 script/public-inbox-convert   | 2 +-
 script/public-inbox-edit      | 2 +-
 script/public-inbox-httpd     | 2 +-
 script/public-inbox-index     | 2 +-
 script/public-inbox-init      | 2 +-
 script/public-inbox-learn     | 2 +-
 script/public-inbox-mda       | 2 +-
 script/public-inbox-nntpd     | 2 +-
 script/public-inbox-purge     | 2 +-
 script/public-inbox-watch     | 2 +-
 script/public-inbox-xcpdb     | 3 ++-
 script/public-inbox.cgi       | 2 +-
 scripts/dupe-finder           | 2 +-
 scripts/import_maildir        | 2 +-
 scripts/import_slrnspool      | 2 +-
 scripts/import_vger_from_mbox | 2 +-
 scripts/slrnspool2maildir     | 2 +-
 scripts/ssoma-replay          | 3 ++-
 scripts/xhdr-num2mid          | 2 +-
 t/check-www-inbox.perl        | 2 +-
 t/git-http-backend.psgi       | 2 +-
 t/hl_mod.t                    | 2 +-
 34 files changed, 41 insertions(+), 34 deletions(-)

diff --git a/Documentation/extman.perl b/Documentation/extman.perl
index a72caca..cba689f 100755
--- a/Documentation/extman.perl
+++ b/Documentation/extman.perl
@@ -1,8 +1,9 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # prints a manpage to stdout
 use strict;
+use warnings;
 my $xapmsg = 'See https://xapian.org/ for more information on Xapian';
 my $usage = "$0 /path/to/manpage.SECTION.txt";
 my $manpage = shift or die $usage;
diff --git a/Documentation/standards.perl b/Documentation/standards.perl
index f75c412..92edbc9 100755
--- a/Documentation/standards.perl
+++ b/Documentation/standards.perl
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 use strict;
+use warnings;
 # Copyright 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
diff --git a/Makefile.PL b/Makefile.PL
index 8daeb4f..eb6f23c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,7 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2013-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
+use warnings;
 use ExtUtils::MakeMaker;
 open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n";
 chomp(my @manifest = (<$m>));
diff --git a/certs/create-certs.perl b/certs/create-certs.perl
index b287cec..607cac5 100755
--- a/certs/create-certs.perl
+++ b/certs/create-certs.perl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # License: GPL-1.0+ or Artistic-1.0-Perl
 # from IO::Socket::SSL 2.063 / https://github.com/noxxi/p5-io-socket-ssl
 use strict;
diff --git a/ci/deps.perl b/ci/deps.perl
index 62870c1..d797a31 100755
--- a/ci/deps.perl
+++ b/ci/deps.perl
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # Helper script for installing/uninstalling packages for CI use
 # Intended for use on non-production chroots or VMs since it
 # changes installed packages
 use strict;
+use warnings;
 my $usage = "$0 PKG_FMT PROFILE [PROFILE_MOD]";
 my $pkg_fmt = shift;
 @ARGV or die $usage, "\n";
diff --git a/examples/cgit.psgi b/examples/cgit.psgi
index ca93f92..8c8a904 100644
--- a/examples/cgit.psgi
+++ b/examples/cgit.psgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 #
diff --git a/examples/highlight.psgi b/examples/highlight.psgi
index 244b128..b07181f 100644
--- a/examples/highlight.psgi
+++ b/examples/highlight.psgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/examples/newswww.psgi b/examples/newswww.psgi
index 0f66782..64c1ad6 100644
--- a/examples/newswww.psgi
+++ b/examples/newswww.psgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 #
diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index 53a5970..92f525e 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # Note: this is part of our test suite, update t/plack.t if this changes
diff --git a/examples/unsubscribe.milter b/examples/unsubscribe.milter
index d6db766..a0f87e0 100644
--- a/examples/unsubscribe.milter
+++ b/examples/unsubscribe.milter
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/examples/unsubscribe.psgi b/examples/unsubscribe.psgi
index 7020af2..a8968ce 100644
--- a/examples/unsubscribe.psgi
+++ b/examples/unsubscribe.psgi
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # This should not require any other PublicInbox code, but may use
 # PublicInbox::Config if ~/.public-inbox/config exists or
 # PI_CONFIG is pointed to an appropriate location
 use strict;
+use warnings;
 use Plack::Builder;
 use PublicInbox::Unsubscribe;
 my $app = PublicInbox::Unsubscribe->new(
diff --git a/script/public-inbox-compact b/script/public-inbox-compact
index e8bf31e..ded81aa 100755
--- a/script/public-inbox-compact
+++ b/script/public-inbox-compact
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/script/public-inbox-convert b/script/public-inbox-convert
index 9d2d251..09e0be0 100755
--- a/script/public-inbox-convert
+++ b/script/public-inbox-convert
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <http://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/script/public-inbox-edit b/script/public-inbox-edit
index 6884fd0..e9c206e 100755
--- a/script/public-inbox-edit
+++ b/script/public-inbox-edit
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd
index b2464f4..da786de 100755
--- a/script/public-inbox-httpd
+++ b/script/public-inbox-httpd
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-index b/script/public-inbox-index
index 439da15..4da9dca 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # Basic tool to create a Xapian search index for a git repository
diff --git a/script/public-inbox-init b/script/public-inbox-init
index 98aea4b..5ec74e9 100755
--- a/script/public-inbox-init
+++ b/script/public-inbox-init
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-learn b/script/public-inbox-learn
index c4c4d4b..6362a83 100755
--- a/script/public-inbox-learn
+++ b/script/public-inbox-learn
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-mda b/script/public-inbox-mda
index 4e6e04e..81f7d0c 100755
--- a/script/public-inbox-mda
+++ b/script/public-inbox-mda
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2013-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-nntpd b/script/public-inbox-nntpd
index 3c4be19..2476780 100755
--- a/script/public-inbox-nntpd
+++ b/script/public-inbox-nntpd
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-purge b/script/public-inbox-purge
index 0705d17..e5cd602 100755
--- a/script/public-inbox-purge
+++ b/script/public-inbox-purge
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/script/public-inbox-watch b/script/public-inbox-watch
index 5cbf761..fc220a1 100755
--- a/script/public-inbox-watch
+++ b/script/public-inbox-watch
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/script/public-inbox-xcpdb b/script/public-inbox-xcpdb
index b41c683..a043b7c 100755
--- a/script/public-inbox-xcpdb
+++ b/script/public-inbox-xcpdb
@@ -1,7 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # xcpdb: Xapian copy database, a wrapper around Xapian's copydatabase(1)
+use warnings;
 use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 use PublicInbox::InboxWritable;
 use PublicInbox::Xapcmd;
diff --git a/script/public-inbox.cgi b/script/public-inbox.cgi
index c0e8e6c..0bf9a1a 100755
--- a/script/public-inbox.cgi
+++ b/script/public-inbox.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ or later <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/scripts/dupe-finder b/scripts/dupe-finder
index 1e98093..afb3610 100644
--- a/scripts/dupe-finder
+++ b/scripts/dupe-finder
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/scripts/import_maildir b/scripts/import_maildir
index fbf3f64..bd6b1de 100755
--- a/scripts/import_maildir
+++ b/scripts/import_maildir
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2014, Eric Wong <e@80x24.org> and all contributors
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool
index 1dccb8d..7e85d26 100755
--- a/scripts/import_slrnspool
+++ b/scripts/import_slrnspool
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox
index b2dd5b3..413936a 100644
--- a/scripts/import_vger_from_mbox
+++ b/scripts/import_vger_from_mbox
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/scripts/slrnspool2maildir b/scripts/slrnspool2maildir
index b321db1..f5599c1 100755
--- a/scripts/slrnspool2maildir
+++ b/scripts/slrnspool2maildir
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2013-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
diff --git a/scripts/ssoma-replay b/scripts/ssoma-replay
index f20e027..c59215c 100755
--- a/scripts/ssoma-replay
+++ b/scripts/ssoma-replay
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2015-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
@@ -26,6 +26,7 @@ ssoma add $NAME $URL "command:/path/to/ssoma-replay -L /path/to/spool/$NAME"
 	command = /path/to/ssoma-replay -L /path/to/spool/meta
 =cut
 use strict;
+use warnings;
 use Email::Simple;
 use URI::Escape qw/uri_escape_utf8/;
 use File::Temp qw/tempfile/;
diff --git a/scripts/xhdr-num2mid b/scripts/xhdr-num2mid
index 717fa46..79a94a4 100755
--- a/scripts/xhdr-num2mid
+++ b/scripts/xhdr-num2mid
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # Useful for mapping article IDs from existing NNTP servers to MIDs
diff --git a/t/check-www-inbox.perl b/t/check-www-inbox.perl
index db292c5..77569d9 100644
--- a/t/check-www-inbox.perl
+++ b/t/check-www-inbox.perl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # Parallel WWW checker
diff --git a/t/git-http-backend.psgi b/t/git-http-backend.psgi
index ed70d50..dc4967d 100644
--- a/t/git-http-backend.psgi
+++ b/t/git-http-backend.psgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
diff --git a/t/hl_mod.t b/t/hl_mod.t
index fc7b712..827b232 100644
--- a/t/hl_mod.t
+++ b/t/hl_mod.t
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # Copyright (C) 2019 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
-- 
2.22.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-02 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24 20:43 [PATCH] #!/usr/bin/perl -> #!/usr/bin/env perl Alyssa Ross
2019-09-26  2:49 ` Eric Wong
2019-10-01 17:47   ` Alyssa Ross
2019-10-01 20:58     ` Eric Wong
2019-10-02 21:36       ` [PATCH] tests: recommend running create-certs.pl with $^X Alyssa Ross
2019-10-02 23:19         ` Eric Wong

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 read-only IMAP folder(s) and NNTP newsgroup(s).