diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2023-03-28 13:29:36 -0700 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2023-03-30 09:53:57 -0700 |
commit | 0e3ae25337152b14c75e4fcc0d6f4da8f9850e3c (patch) | |
tree | 3d48f3b2b9cdfbeb9fc111bb5e72f4f001ae52b0 /tests/version-scan.pl | |
parent | b133f70a52703ccc6469280ae141643bcc06a685 (diff) | |
download | curl-0e3ae25337152b14c75e4fcc0d6f4da8f9850e3c.tar.gz |
tests: switch to 3-argument open in test suite
The perl 2-argument open has been considered not-quite-deprecated since
the 3-argument form was introduced almost a quarter century ago.
Diffstat (limited to 'tests/version-scan.pl')
-rwxr-xr-x | tests/version-scan.pl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/version-scan.pl b/tests/version-scan.pl index 156502480..3c055d9b3 100755 --- a/tests/version-scan.pl +++ b/tests/version-scan.pl @@ -39,8 +39,8 @@ my %manname; my %sourcename; my $error=0; -open(M, "<$manpage"); -while(<M>) { +open(my $m, "<", "$manpage"); +while(<$m>) { if($_ =~ / mask bit: (CURL_VERSION_[A-Z0-9_]+)/i) { $manversion{$1}++; } @@ -48,23 +48,23 @@ while(<M>) { $manname{$1}++; } } -close(M); +close($m); -open(H, "<$header"); -while(<H>) { +open(my $h, "<", "$header"); +while(<$h>) { if($_ =~ /^\#define (CURL_VERSION_[A-Z0-9_]+)/i) { $headerversion{$1}++; } } -close(H); +close($h); -open(S, "<$source"); -while(<S>) { +open(my $s, "<", "$source"); +while(<$s>) { if($_ =~ /FEATURE\("([^"]*)"/) { $sourcename{$1}++; } } -close(S); +close($s); for my $h (keys %headerversion) { if(!$manversion{$h}) { |