[monitoring-plugins] opttest.pl Fix Perl complaints
Lorenz Kästle
git at monitoring-plugins.org
Thu Feb 20 16:40:12 CET 2025
Module: monitoring-plugins
Branch: master
Commit: 73bd77ef84e40b43f2ff47d7adb569249e14954f
Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
Date: Wed Feb 19 14:36:05 2025 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=73bd77ef
opttest.pl Fix Perl complaints
---
opttest.pl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/opttest.pl b/opttest.pl
index 85e3b494..96c4fb0a 100755
--- a/opttest.pl
+++ b/opttest.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl -w
use strict;
+use warnings;
use Test;
use vars qw($dir $file $prog $idx $state $output %progs @dirs);
@@ -8,7 +9,7 @@ my $tests = 0;
@dirs = qw(plugins plugins-scripts);
-foreach $dir (@dirs) {
+foreach my $dir (@dirs) {
opendir(DIR, $dir) || die "can't opendir $dir: $!";
while ($file = readdir(DIR)) {
if (-x "$dir/$file" && -f "$dir/$file") {
@@ -21,7 +22,7 @@ foreach $dir (@dirs) {
plan tests => $tests;
-for $prog (keys %progs) {
+for my $prog (keys %progs) {
$state = 0;
$file = `basename $prog`;
More information about the Commits
mailing list