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:
@@ -98,7 +98,8 @@ sub buildFinished {
|
||||
foreach my $reference (@{$refs}) {
|
||||
push @needed_paths, $reference;
|
||||
}
|
||||
while (my ($compression_type, $configs) = each %compression_types) {
|
||||
foreach my $compression_type (keys %compression_types) {
|
||||
my $configs = $compression_types{$compression_type};
|
||||
my @incomplete_buckets = ();
|
||||
# Don't do any work if all the buckets have this path
|
||||
foreach my $bucket_config (@{$configs}) {
|
||||
@@ -144,7 +145,8 @@ sub buildFinished {
|
||||
}
|
||||
|
||||
# Upload narinfos
|
||||
while (my ($compression_type, $infos) = each %narinfos) {
|
||||
foreach my $compression_type (keys %narinfos) {
|
||||
my $infos = $narinfos{$compression_type};
|
||||
foreach my $bucket_config (@{$compression_types{$compression_type}}) {
|
||||
foreach my $info (@{$infos}) {
|
||||
my $bucket = $client->bucket( name => $bucket_config->{name} );
|
||||
|
Reference in New Issue
Block a user