Remove postfix if/for (PBP)

This commit is contained in:
Dan Church 2023-07-20 13:05:12 -05:00
parent 15c466e581
commit 98c2c04263
Signed by: h3xx
GPG key ID: EA2BF379CD2CDBD0
4 changed files with 43 additions and 28 deletions

View file

@ -36,7 +36,9 @@ sub add {
$self->{_entries}->{$hash} = [];
}
push @{$self->{_entries}->{$hash}}, $file;
$callback->($file) if ref $callback eq 'CODE';
if (ref $callback eq 'CODE') {
$callback->($file);
}
}
$self->{_files_in_hash}->{$file->{name}} = 1;
}

View file

@ -30,7 +30,9 @@ sub hr_size {
}
# default to ($sz, 'bytes')
@ret = ($sz, $sizes[0]) unless @ret;
unless (@ret) {
@ret = ($sz, $sizes[0]);
}
return wantarray ? @ret : "@ret";
}