140 |
# ... do something with input config hash |
# ... do something with input config hash |
141 |
} ); |
} ); |
142 |
|
|
143 |
|
This function will also modify C<< $input->{normalize} >> to |
144 |
|
be C<ARRAY>, even with just one element. |
145 |
|
|
146 |
=cut |
=cut |
147 |
|
|
148 |
sub iterate_inputs { |
sub iterate_inputs { |
165 |
|
|
166 |
foreach my $input (@inputs) { |
foreach my $input (@inputs) { |
167 |
$log->debug("iterating over input ", dump($input)); |
$log->debug("iterating over input ", dump($input)); |
168 |
|
if ( defined( $input->{normalize} ) && ref($input->{normalize}) ne 'ARRAY' ) { |
169 |
|
$input->{normalize} = [ $input->{normalize} ]; |
170 |
|
} |
171 |
$code_ref->($input, $database, $db_config); |
$code_ref->($input, $database, $db_config); |
172 |
} |
} |
173 |
} |
} |