App-Greple-xlate
view release on metacpan or search on metacpan
lib/App/Greple/xlate/Cache.pm view on Meta::CPAN
$lo = 0 if $lo < 0;
$hi = $#$order if $hi > $#$order;
my @out;
for my $k (@$order[$lo .. $hi]) {
my $v = $obj->saved->{$k} // $obj->current->{$k};
push @out, [ $k, $v ] if defined $v;
}
@out;
}
sub update {
my $obj = shift;
return if $obj->readonly;
my $file = $obj->name || return;
if (not $obj->force_update and $obj->updated == 0) {
# accumulate: nothing changed, disk content is already right.
# otherwise: return only when there is nothing to purge.
return if not $obj->seeded and ($obj->accumulate or %{$obj->saved} == 0);
}
if ($obj->accumulate) {
# POD promises unused entries survive: adopt them unconditionally
( run in 0.501 second using v1.01-cache-2.11-cpan-d01c6094234 )