read_recap: Use a named loop variable (for readability)
This commit is contained in:
parent
65d2473213
commit
31740006d0
1 changed files with 3 additions and 3 deletions
|
|
@ -1646,7 +1646,7 @@ sub read_recap {
|
||||||
# different pieces of code need to know the list of status variables, and keeping them all
|
# different pieces of code need to know the list of status variables, and keeping them all
|
||||||
# in sync is error-prone (DRY). Also, different protocols might need different status
|
# in sync is error-prone (DRY). Also, different protocols might need different status
|
||||||
# variables.
|
# variables.
|
||||||
for (qw(atime mtime wtime ipv4 ipv6 status-ipv4 status-ipv6
|
for my $v (qw(atime mtime wtime ipv4 ipv6 status-ipv4 status-ipv6
|
||||||
warned-min-interval warned-min-error-interval)) {
|
warned-min-interval warned-min-error-interval)) {
|
||||||
# TODO: This is a no-op because `$config` is `\%recap`. I believe the original intent
|
# TODO: This is a no-op because `$config` is `\%recap`. I believe the original intent
|
||||||
# was to copy values that convey update status from `%recap` into `%config` so that
|
# was to copy values that convey update status from `%recap` into `%config` so that
|
||||||
|
|
@ -1656,7 +1656,7 @@ sub read_recap {
|
||||||
# `%recap` into `%config` because `%config` is not the semantically appropriate place
|
# `%recap` into `%config` because `%config` is not the semantically appropriate place
|
||||||
# to record update status. Code that currently reads/sets `$config{$h}{'status-ipv4'}`
|
# to record update status. Code that currently reads/sets `$config{$h}{'status-ipv4'}`
|
||||||
# (and friends) should instead access `$recap{$h}{'status-ipv4'}` directly.
|
# (and friends) should instead access `$recap{$h}{'status-ipv4'}` directly.
|
||||||
$config->{$h}{$_} = $recap{$h}{$_} if exists $recap{$h}{$_};
|
$config->{$h}{$v} = $recap{$h}{$v} if exists($recap{$h}{$v});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue