This is particularly useful on operating systems that don't ship
Perl as part of the base system (eg. FreeBSD) while still working
just as well as it did before on Linux.
In one case (src/rpc/genprotocol.pl) the interpreter path was
missing altogether.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
build-aux/augeas-gentest.pl | 2 +-
build-aux/check-spacing.pl | 2 +-
build-aux/mock-noinline.pl | 2 +-
build-aux/prohibit-duplicate-header.pl | 2 +-
docs/genaclperms.pl | 2 +-
docs/hvsupport.pl | 2 +-
src/access/genpolkit.pl | 2 +-
src/check-aclperms.pl | 2 +-
src/check-aclrules.pl | 2 +-
src/check-driverimpls.pl | 2 +-
src/check-drivername.pl | 2 +-
src/check-symfile.pl | 2 +-
src/check-symsorting.pl | 2 +-
src/dtrace2systemtap.pl | 2 +-
src/rpc/gendispatch.pl | 3 ++-
src/rpc/genprotocol.pl | 1 +
src/rpc/gensystemtap.pl | 2 +-
tests/check-file-access.pl | 2 +-
tests/oomtrace.pl | 2 +-
19 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/build-aux/augeas-gentest.pl b/build-aux/augeas-gentest.pl
index ece9a8a00..18a1c5bce 100755
--- a/build-aux/augeas-gentest.pl
+++ b/build-aux/augeas-gentest.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# augeas-gentest.pl: Generate an augeas test file, from an
# example config file + test file template
diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl
index 448acf234..ca8b43491 100755
--- a/build-aux/check-spacing.pl
+++ b/build-aux/check-spacing.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# check-spacing.pl: Report any usage of 'function (..args..)'
# Also check for other syntax issues, such as correct use of ';'
diff --git a/build-aux/mock-noinline.pl b/build-aux/mock-noinline.pl
index eafe20d2e..c6b40001c 100644
--- a/build-aux/mock-noinline.pl
+++ b/build-aux/mock-noinline.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
my %noninlined;
my %mocked;
diff --git a/build-aux/prohibit-duplicate-header.pl
b/build-aux/prohibit-duplicate-header.pl
index f0539aeca..4a2ea6566 100644
--- a/build-aux/prohibit-duplicate-header.pl
+++ b/build-aux/prohibit-duplicate-header.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
diff --git a/docs/genaclperms.pl b/docs/genaclperms.pl
index c0514a022..d878321a9 100755
--- a/docs/genaclperms.pl
+++ b/docs/genaclperms.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2013 Red Hat, Inc.
#
diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index edbe19faf..fc6eb1f15 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
diff --git a/src/access/genpolkit.pl b/src/access/genpolkit.pl
index eb7069a6d..6258fd3a1 100755
--- a/src/access/genpolkit.pl
+++ b/src/access/genpolkit.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2012-2013 Red Hat, Inc.
#
diff --git a/src/check-aclperms.pl b/src/check-aclperms.pl
index 5b1b4dbad..55b659831 100755
--- a/src/check-aclperms.pl
+++ b/src/check-aclperms.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2013 Red Hat, Inc.
#
diff --git a/src/check-aclrules.pl b/src/check-aclrules.pl
index 8739cda73..5b6c711dc 100755
--- a/src/check-aclrules.pl
+++ b/src/check-aclrules.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2013-2014 Red Hat, Inc.
#
diff --git a/src/check-driverimpls.pl b/src/check-driverimpls.pl
index e32055835..4c28f2092 100755
--- a/src/check-driverimpls.pl
+++ b/src/check-driverimpls.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2013 Red Hat, Inc.
#
diff --git a/src/check-drivername.pl b/src/check-drivername.pl
index 5c8de0aa1..3a62193e3 100755
--- a/src/check-drivername.pl
+++ b/src/check-drivername.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2013 Red Hat, Inc.
#
diff --git a/src/check-symfile.pl b/src/check-symfile.pl
index d59a213eb..4f8830086 100755
--- a/src/check-symfile.pl
+++ b/src/check-symfile.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (C) 2012-2013 Red Hat, Inc.
#
diff --git a/src/check-symsorting.pl b/src/check-symsorting.pl
index 81265e04d..51e38bded 100755
--- a/src/check-symsorting.pl
+++ b/src/check-symsorting.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright (C) 2012-2013 Red Hat, Inc.
#
diff --git a/src/dtrace2systemtap.pl b/src/dtrace2systemtap.pl
index 19d980564..92c76a66e 100755
--- a/src/dtrace2systemtap.pl
+++ b/src/dtrace2systemtap.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2011-2012 Red Hat, Inc.
#
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index e7a48d578..fb15cc484 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
#
# Copyright (C) 2010-2015 Red Hat, Inc.
#
@@ -32,6 +32,7 @@
# Extended by Matthias Bolte <matthias.bolte(a)googlemail.com>
use strict;
+use warnings;
use Getopt::Long;
diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index 69d20a344..6ce268c02 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/env perl
#
# Generate code for an XDR protocol, optionally applying
# fixups to the glibc rpcgen code so that it compiles
diff --git a/src/rpc/gensystemtap.pl b/src/rpc/gensystemtap.pl
index 7b80fbf83..c0d343509 100755
--- a/src/rpc/gensystemtap.pl
+++ b/src/rpc/gensystemtap.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright (C) 2011-2012 Red Hat, Inc.
#
diff --git a/tests/check-file-access.pl b/tests/check-file-access.pl
index 0c75ae998..977a2bc53 100755
--- a/tests/check-file-access.pl
+++ b/tests/check-file-access.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
#
# Copyright (C) 2016 Red Hat, Inc.
#
diff --git a/tests/oomtrace.pl b/tests/oomtrace.pl
index 6d423e796..f799262f2 100755
--- a/tests/oomtrace.pl
+++ b/tests/oomtrace.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use strict;
use warnings;
--
2.13.5