perlcritic: each() called at line 752, column 35. The each function may cause undefined behavior when operating on the hash while iterating. Use a foreach loop over the hash's keys or values instead.

This commit is contained in:
Graham Christensen
2021-10-20 11:56:16 -04:00
parent 7dcf6a01c6
commit 4dfe787bc2
4 changed files with 16 additions and 8 deletions

View File

@@ -118,7 +118,8 @@ sub fetchInput {
$jobset->get_column('name'),
$name);
# give preference to the options from the input value
while (my ($opt_name, $opt_value) = each %{$options}) {
foreach my $opt_name (keys %{$options}) {
my $opt_value = $options{$opt_name};
if ($opt_value =~ /^[+-]?\d+\z/) {
$opt_value = int($opt_value);
}