get_reviewer.pl: improve portability

Submitted by Alyssa Ross on April 19, 2019, 6:14 p.m.

Details

Message ID 20190419181444.30316-1-hi@alyssa.is
State New
Headers show
Series "get_reviewer.pl: improve portability" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Ross April 19, 2019, 6:14 p.m.
Not all package managers / users will install perl into /usr/bin,
but /usr/bin/env /should/ always be present.

Using /usr/bin/env means that we can't give the -w argument to Perl,
so I added `use warnings' in the script.

Cc: Rob Clark <robclark@freedesktop.org>
---
 scripts/get_reviewer.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.19.2

Patch hide | download patch | download mbox

diff --git a/scripts/get_reviewer.pl b/scripts/get_reviewer.pl
index 62deb922800..1677495ad6d 100755
--- a/scripts/get_reviewer.pl
+++ b/scripts/get_reviewer.pl
@@ -1,4 +1,4 @@ 
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2007, Joe Perches <joe@perches.com>
 #           created from checkpatch.pl
 #
@@ -14,6 +14,7 @@ 
 # Licensed under the terms of the GNU GPL License version 2

 use strict;
+use warnings;

 my $P = $0;
 my $V = '0.26';

Comments

looks like the kernel get_maintainer.pl made a similar change at some
point.. anyways, seems like a good idea

r-b

On Fri, Apr 19, 2019 at 11:15 AM Alyssa Ross <hi@alyssa.is> wrote:
>
> Not all package managers / users will install perl into /usr/bin,
> but /usr/bin/env /should/ always be present.
>
> Using /usr/bin/env means that we can't give the -w argument to Perl,
> so I added `use warnings' in the script.
>
> Cc: Rob Clark <robclark@freedesktop.org>
> ---
>  scripts/get_reviewer.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/get_reviewer.pl b/scripts/get_reviewer.pl
> index 62deb922800..1677495ad6d 100755
> --- a/scripts/get_reviewer.pl
> +++ b/scripts/get_reviewer.pl
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl -w
> +#!/usr/bin/env perl
>  # (c) 2007, Joe Perches <joe@perches.com>
>  #           created from checkpatch.pl
>  #
> @@ -14,6 +14,7 @@
>  # Licensed under the terms of the GNU GPL License version 2
>
>  use strict;
> +use warnings;
>
>  my $P = $0;
>  my $V = '0.26';
> --
> 2.19.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev