perl modules: fix braces for loop array

This commit is contained in:
Lars Kruse 2018-03-08 04:49:45 +01:00
parent 22523e8f5b
commit 74b58a592a
3 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ sub periodic_write {
$old{$vpm}{'avg_bytes'}=sprintf("%d",($old{$vpm}{'avg_bytes'}+$temp{$vpm}{'avg_bytes'})/2);
# reset local counters
foreach my $check qw(requests bytes time cml_time max_bytes avg_bytes max_time avg_time) {
foreach my $check (qw(requests bytes time cml_time max_bytes avg_bytes max_time avg_time)) {
$temp{$vpm}{$check}=0;
}

View File

@ -160,7 +160,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
print_thresholds($v);
}
for my $field qw(avg) {
for my $field (qw(avg)) {
print_thresholds($field);
}
&close_session($session);

View File

@ -139,7 +139,7 @@ my $converter = Text::Iconv->new("UTF-8", "LATIN1");
# $converted = $converter->convert("Text to convert");
# First all the simple readings
foreach my $attr qw (albums artists genres songs) {
foreach my $attr (qw(albums artists genres songs)) {
$conn->print ("info total ${attr} ?");
my $line = uri_unescape($conn->getline);
if ($line =~ /^info total ${attr} (\d+)$/) {