test1140.pl: enable strict/warnings, fix them

This commit is contained in:
Viktor Szakats 2025-07-09 22:10:23 +02:00
parent d672bbd876
commit d541cd3999
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -26,7 +26,10 @@
# scan manpages to find basic syntactic problems such as unbalanced \f
# codes or references to non-existing curl manpages.
my $docsroot = $ARGV[0];
use strict;
use warnings 'FATAL' => 'all';
my $docsroot = $ARGV[0] || '.';
if(!$docsroot || ($docsroot eq "-g")) {
print "Usage: test1140.pl <docs root dir> [manpages]\n";
@ -40,6 +43,8 @@ my @f = @ARGV;
my %manp;
my $errors = 0;
sub manpresent {
my ($man) = @_;
if($manp{$man}) {