From fc7149b4564ff5d15f6e2162e27875b712362233 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 20 May 2025 23:55:03 +0200 Subject: [PATCH] MT#62763 perl: Do not use bareword file handles Warned-by: perlcritic Fixes: InputOutput::ProhibitBarewordFileHandles Change-Id: Id66f79a65791c2db996972450b99c60c67799e8c --- doc/munin-sems-stats-monitoring.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/munin-sems-stats-monitoring.pl b/doc/munin-sems-stats-monitoring.pl index bad4c88b..5e4fcccd 100644 --- a/doc/munin-sems-stats-monitoring.pl +++ b/doc/munin-sems-stats-monitoring.pl @@ -16,24 +16,24 @@ if($ARGV[0] and $ARGV[0] eq 'config') { exit 0; } -open(FILE, "sems-stats|"); +open my $fh_active, "sems-stats|"; -while() +while (<$fh_active>) { if($_ =~ /Active calls: (.*)\n/) { print "calls.value $1\n"; } } -close FILE; +close $fh_active; -open(FILE, "sems-stats -c get_callsmax|"); +open my $fh_max, "sems-stats -c get_callsmax|"; -while() +while (<$fh_max>) { if($_ =~ /Maximum active calls: (.*)\n/) { print "peak.value $1\n"; } } -close FILE; +close $fh_max;