mirror of
https://codeberg.org/h3xx/simplify_static_dir
synced 2024-08-14 23:57:24 +00:00
Remove postfix if/for (PBP)
This commit is contained in:
parent
15c466e581
commit
98c2c04263
4 changed files with 43 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue