diff options
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/CVS_Entry.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/Change.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/Line.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/Patches.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/SimpleMatch.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/SubstContext.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/Type.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/Util.pm | 3 | ||||
-rw-r--r-- | pkgtools/pkglint/files/PkgLint/VarUseContext.pm | 1 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 8 |
10 files changed, 21 insertions, 12 deletions
diff --git a/pkgtools/pkglint/files/PkgLint/CVS_Entry.pm b/pkgtools/pkglint/files/PkgLint/CVS_Entry.pm index ce84cbdc27b..4bf466c642a 100644 --- a/pkgtools/pkglint/files/PkgLint/CVS_Entry.pm +++ b/pkgtools/pkglint/files/PkgLint/CVS_Entry.pm @@ -1,10 +1,11 @@ -# $NetBSD: CVS_Entry.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: CVS_Entry.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # One line from a CVS/Entries file. # package PkgLint::CVS_Entry; use strict; +use warnings; use enum qw(FNAME REVISION MTIME TAG); diff --git a/pkgtools/pkglint/files/PkgLint/Change.pm b/pkgtools/pkglint/files/PkgLint/Change.pm index ef029e91c75..50b1101c682 100644 --- a/pkgtools/pkglint/files/PkgLint/Change.pm +++ b/pkgtools/pkglint/files/PkgLint/Change.pm @@ -1,10 +1,11 @@ -# $NetBSD: Change.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: Change.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # A change entry from doc/CHANGES-* # package PkgLint::Change; use strict; +use warnings; sub new($$$$$$) { my ($class, $line, $action, $pkgpath, $version, $author, $date) = @_; diff --git a/pkgtools/pkglint/files/PkgLint/Line.pm b/pkgtools/pkglint/files/PkgLint/Line.pm index bd4e6cb427b..8f4aae30c17 100644 --- a/pkgtools/pkglint/files/PkgLint/Line.pm +++ b/pkgtools/pkglint/files/PkgLint/Line.pm @@ -1,4 +1,4 @@ -# $NetBSD: Line.pm,v 1.4 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: Line.pm,v 1.5 2015/10/11 21:23:34 rillig Exp $ # # When files are read in by pkglint, they are interpreted in terms of # lines. For Makefiles, line continuations are handled properly, allowing @@ -23,6 +23,7 @@ package PkgLint::Line; use strict; +use warnings; BEGIN { import PkgLint::Util qw( diff --git a/pkgtools/pkglint/files/PkgLint/Patches.pm b/pkgtools/pkglint/files/PkgLint/Patches.pm index c96fd3ce063..a6a7984e2d0 100644 --- a/pkgtools/pkglint/files/PkgLint/Patches.pm +++ b/pkgtools/pkglint/files/PkgLint/Patches.pm @@ -1,9 +1,10 @@ -# $NetBSD: Patches.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: Patches.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # Everything concerning checks for patch files. # use strict; +use warnings; # Guess the type of file based on the filename. This is used to select # the proper subroutine for detecting absolute pathnames. diff --git a/pkgtools/pkglint/files/PkgLint/SimpleMatch.pm b/pkgtools/pkglint/files/PkgLint/SimpleMatch.pm index bf469e09e7d..a1f616fd365 100644 --- a/pkgtools/pkglint/files/PkgLint/SimpleMatch.pm +++ b/pkgtools/pkglint/files/PkgLint/SimpleMatch.pm @@ -1,4 +1,4 @@ -# $NetBSD: SimpleMatch.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: SimpleMatch.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # A SimpleMatch is the result of applying a regular expression to a Perl # scalar value. It can return the range and the text of the captured @@ -7,6 +7,7 @@ package PkgLint::SimpleMatch; use strict; +use warnings; use enum qw(STRING STARTS ENDS N); diff --git a/pkgtools/pkglint/files/PkgLint/SubstContext.pm b/pkgtools/pkglint/files/PkgLint/SubstContext.pm index b028f5840f8..7b8d50dd637 100644 --- a/pkgtools/pkglint/files/PkgLint/SubstContext.pm +++ b/pkgtools/pkglint/files/PkgLint/SubstContext.pm @@ -1,4 +1,4 @@ -# $NetBSD: SubstContext.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: SubstContext.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # This class records the state of a block of variable assignments that make # up a SUBST class. As these variable assignments are not easy to get right @@ -8,6 +8,7 @@ package PkgLint::SubstContext; use strict; +use warnings; BEGIN { import PkgLint::Util qw( diff --git a/pkgtools/pkglint/files/PkgLint/Type.pm b/pkgtools/pkglint/files/PkgLint/Type.pm index 17bce8d8205..8d253cb1795 100644 --- a/pkgtools/pkglint/files/PkgLint/Type.pm +++ b/pkgtools/pkglint/files/PkgLint/Type.pm @@ -1,4 +1,4 @@ -# $NetBSD: Type.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: Type.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # A Type in pkglint is a combination of a data type and a permission # specification. Further details can be found in the chapter ``The pkglint @@ -7,6 +7,7 @@ package PkgLint::Type; use strict; +use warnings; BEGIN { import PkgLint::Util qw( diff --git a/pkgtools/pkglint/files/PkgLint/Util.pm b/pkgtools/pkglint/files/PkgLint/Util.pm index 5683638d11d..aaac5b94634 100644 --- a/pkgtools/pkglint/files/PkgLint/Util.pm +++ b/pkgtools/pkglint/files/PkgLint/Util.pm @@ -1,4 +1,4 @@ -# $NetBSD: Util.pm,v 1.2 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: Util.pm,v 1.3 2015/10/11 21:23:34 rillig Exp $ # # This package is a catch-all for subroutines that are not application-spe- # cific. Currently it contains the boolean constants C<false> and C<true>, @@ -10,6 +10,7 @@ package PkgLint::Util; use strict; +use warnings; BEGIN { use Exporter; diff --git a/pkgtools/pkglint/files/PkgLint/VarUseContext.pm b/pkgtools/pkglint/files/PkgLint/VarUseContext.pm index a782daca27f..8311624340b 100644 --- a/pkgtools/pkglint/files/PkgLint/VarUseContext.pm +++ b/pkgtools/pkglint/files/PkgLint/VarUseContext.pm @@ -5,6 +5,7 @@ package PkgLint::VarUseContext; use strict; +use warnings; BEGIN { import PkgLint::Util qw( diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 55030131c35..129e1bd866c 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.888 2015/10/11 21:06:20 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.889 2015/10/11 21:23:34 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -2693,7 +2693,7 @@ sub checkline_mk_varuse($$$$) { } } - if ($opt_warn_quoting and $context->shellword != VUC_SHELLWORD_UNKNOWN && $needs_quoting != dont_know) { + if ($opt_warn_quoting && $context->shellword != VUC_SHELLWORD_UNKNOWN && $needs_quoting != dont_know) { # In GNU configure scripts, a few variables need to be # passed through the :M* operator before they reach the @@ -5614,7 +5614,7 @@ sub checkfile_distinfo($) { if (open(my $patchfile, "<", $fname)) { my $sha1 = Digest::SHA1->new(); - foreach my $patchline (<$patchfile>) { + while (defined(my $patchline = <$patchfile>)) { $sha1->add($patchline) unless $patchline =~ m"\$[N]etBSD"; } close($patchfile); @@ -6743,7 +6743,7 @@ sub checkitem($) { sub main() { - $| = true; + local $| = true; parse_command_line(); @todo_items = (@ARGV != 0) ? @ARGV : ("."); |