The default NetBSD package manager is pkgsrc and it installs Perl along other third party programs under custom and configurable prefix. The default prefix for binary prebuilt packages is /usr/pkg, and the Perl executable lands in /usr/pkg/bin/perl. This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's the most portable solution that should work for almost everybody. Perl's executable is detected automatically. This change switches -w option passed to the executable with more modern "use warnings;" approach. There is no functional change to the default behavior. While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
Unified · Split
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # Copyright 2008, Intel Corporation | 3 | # Copyright 2008, Intel Corporation |
| 4 | # | 4 | # |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # checkincludes: find/remove files included more than once | 3 | # checkincludes: find/remove files included more than once |
| 4 | # | 4 | # |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # (c) 2001, Dave Jones. (the file handling bit) | 2 | # (c) 2001, Dave Jones. (the file handling bit) |
| 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) | 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) |
| 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) | 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) |
| @@ -6,6 +6,7 @@ · 1 unmodified line | |||
| 6 | # Licensed under the terms of the GNU GPL License version 2 | 6 | # Licensed under the terms of the GNU GPL License version 2 |
| 7 | 7 | ||
| 8 | use strict; | 8 | use strict; |
| 9 | use warnings; | ||
| 9 | use POSIX; | 10 | use POSIX; |
| 10 | use File::Basename; | 11 | use File::Basename; |
| 11 | use Cwd 'abs_path'; | 12 | use Cwd 'abs_path'; |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # Check the stack usage of functions | 3 | # Check the stack usage of functions |
| 4 | # | 4 | # |
| @@ -1,4 +1,4 @@ | |||
| 1 | #! /usr/bin/perl | 1 | #! /usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION | 3 | # checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION |
| 4 | # without including <linux/version.h>, or cases of | 4 | # without including <linux/version.h>, or cases of |
| @@ -1,9 +1,10 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # Clean a text file -- or directory of text files -- of stealth whitespace. | 3 | # Clean a text file -- or directory of text files -- of stealth whitespace. |
| 4 | # WARNING: this can be a highly destructive operation. Use with caution. | 4 | # WARNING: this can be a highly destructive operation. Use with caution. |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | use warnings; | ||
| 7 | use bytes; | 8 | use bytes; |
| 8 | use File::Basename; | 9 | use File::Basename; |
| 9 | 10 | ||
| @@ -1,9 +1,10 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # Clean a patch file -- or directory of patch files -- of stealth whitespace. | 3 | # Clean a patch file -- or directory of patch files -- of stealth whitespace. |
| 4 | # WARNING: this can be a highly destructive operation. Use with caution. | 4 | # WARNING: this can be a highly destructive operation. Use with caution. |
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | use warnings; | ||
| 7 | use bytes; | 8 | use bytes; |
| 8 | use File::Basename; | 9 | use File::Basename; |
| 9 | 10 | ||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # Copyright 2016 by Frank Rowand | 3 | # Copyright 2016 by Frank Rowand |
| 4 | # Copyright 2016 by Gaurav Minocha | 4 | # Copyright 2016 by Gaurav Minocha |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # (C) Copyright IBM Corporation 2006. | 3 | # (C) Copyright IBM Corporation 2006. |
| 4 | # Released under GPL v2. | 4 | # Released under GPL v2. |
| @@ -7,6 +7,7 @@ · 2 unmodified lines | |||
| 7 | # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c | 7 | # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c |
| 8 | # | 8 | # |
| 9 | 9 | ||
| 10 | use warnings; | ||
| 10 | use Getopt::Std; | 11 | use Getopt::Std; |
| 11 | use strict; | 12 | use strict; |
| 12 | 13 | ||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # extract-mod-sig <part> <module-file> | 3 | # extract-mod-sig <part> <module-file> |
| 4 | # | 4 | # |
| @@ -12,6 +12,7 @@ · 7 unmodified lines | |||
| 12 | # -k: Just the key ID | 12 | # -k: Just the key ID |
| 13 | # -s: Just the crypto signature or PKCS#7 message | 13 | # -s: Just the crypto signature or PKCS#7 message |
| 14 | # | 14 | # |
| 15 | use warnings; | ||
| 15 | use strict; | 16 | use strict; |
| 16 | 17 | ||
| 17 | die "Format: $0 -[0adnks] module-file >out\n" | 18 | die "Format: $0 -[0adnks] module-file >out\n" |
| @@ -1,5 +1,6 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | use warnings; | ||
| 3 | use strict; | 4 | use strict; |
| 4 | use Math::BigInt; | 5 | use Math::BigInt; |
| 5 | use Fcntl "SEEK_SET"; | 6 | use Fcntl "SEEK_SET"; |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org> | 3 | # Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org> |
| 4 | # Released under GPLv2 | 4 | # Released under GPLv2 |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | # DVB firmware extractor | 2 | # DVB firmware extractor |
| 3 | # | 3 | # |
| 4 | # (c) 2004 Andrew de Quincey | 4 | # (c) 2004 Andrew de Quincey |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # (c) 2007, Joe Perches <joe@perches.com> | 2 | # (c) 2007, Joe Perches <joe@perches.com> |
| 3 | # created from checkpatch.pl | 3 | # created from checkpatch.pl |
| 4 | # | 4 | # |
| @@ -10,6 +10,7 @@ · 5 unmodified lines | |||
| 10 | # | 10 | # |
| 11 | # Licensed under the terms of the GNU GPL License version 2 | 11 | # Licensed under the terms of the GNU GPL License version 2 |
| 12 | 12 | ||
| 13 | use warnings; | ||
| 13 | use strict; | 14 | use strict; |
| 14 | 15 | ||
| 15 | my $P = $0; | 16 | my $P = $0; |
| @@ -1,4 +1,4 @@ | |||
| 1 | #! /usr/bin/perl | 1 | #! /usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # Detect cycles in the header file dependency graph | 3 | # Detect cycles in the header file dependency graph |
| 4 | # Vegard Nossum <vegardno@ifi.uio.no> | 4 | # Vegard Nossum <vegardno@ifi.uio.no> |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # headers_check.pl execute a number of trivial consistency checks | 3 | # headers_check.pl execute a number of trivial consistency checks |
| 4 | # | 4 | # |
| @@ -18,6 +18,7 @@ · 13 unmodified lines | |||
| 18 | # | 18 | # |
| 19 | # 3) Check for leaked CONFIG_ symbols | 19 | # 3) Check for leaked CONFIG_ symbols |
| 20 | 20 | ||
| 21 | use warnings; | ||
| 21 | use strict; | 22 | use strict; |
| 22 | use File::Basename; | 23 | use File::Basename; |
| 23 | 24 | ||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # Copyright 2005-2009 - Steven Rostedt | 3 | # Copyright 2005-2009 - Steven Rostedt |
| 4 | # Licensed under the terms of the GNU GPL License version 2 | 4 | # Licensed under the terms of the GNU GPL License version 2 |
| @@ -42,6 +42,7 @@ · 37 unmodified lines | |||
| 42 | # mv config_strip .config | 42 | # mv config_strip .config |
| 43 | # make oldconfig | 43 | # make oldconfig |
| 44 | # | 44 | # |
| 45 | use warnings; | ||
| 45 | use strict; | 46 | use strict; |
| 46 | use Getopt::Long; | 47 | use Getopt::Long; |
| 47 | 48 | ||
| @@ -1,5 +1,6 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | use warnings; | ||
| 3 | use strict; | 4 | use strict; |
| 4 | 5 | ||
| 5 | ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## | 6 | ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## |
| @@ -1,5 +1,6 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | use warnings; | ||
| 3 | use strict; | 4 | use strict; |
| 4 | 5 | ||
| 5 | ## Copyright (C) 2015 Intel Corporation ## | 6 | ## Copyright (C) 2015 Intel Corporation ## |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | use File::Basename; | 3 | use File::Basename; |
| 4 | use Math::BigInt; | 4 | use Math::BigInt; |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # | 2 | # |
| 3 | # namespace.pl. Mon Aug 30 2004 | 3 | # namespace.pl. Mon Aug 30 2004 |
| 4 | # | 4 | # |
| @@ -62,7 +62,7 @@ · 57 unmodified lines | |||
| 62 | # result. | 62 | # result. |
| 63 | # | 63 | # |
| 64 | 64 | ||
| 65 | require 5; # at least perl 5 | 65 | use warnings; |
| 66 | use strict; | 66 | use strict; |
| 67 | use File::Find; | 67 | use File::Find; |
| 68 | 68 | ||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # | 3 | # |
| 4 | # Takes a (sorted) output of readprofile and turns it into a list suitable for | 4 | # Takes a (sorted) output of readprofile and turns it into a list suitable for |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/env perl |
| 2 | # (c) 2008, Steven Rostedt <srostedt@redhat.com> | 2 | # (c) 2008, Steven Rostedt <srostedt@redhat.com> |
| 3 | # Licensed under the terms of the GNU GPL License version 2 | 3 | # Licensed under the terms of the GNU GPL License version 2 |
| 4 | # | 4 | # |
| @@ -106,6 +106,7 @@ · 101 unmodified lines | |||
| 106 | # 9) Move the result back to the original object. | 106 | # 9) Move the result back to the original object. |
| 107 | # | 107 | # |
| 108 | 108 | ||
| 109 | use warnings; | ||
| 109 | use strict; | 110 | use strict; |
| 110 | 111 | ||
| 111 | my $P = $0; | 112 | my $P = $0; |
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/env perl |
| 2 | 2 | ||
| 3 | # Read two files produced by the stackusage script, and show the | 3 | # Read two files produced by the stackusage script, and show the |
| 4 | # delta between them. | 4 | # delta between them. |