X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FInbox.pm;h=e9efd29d40a4b46f993bef2075653f632cb43544;hb=b782533a0413578de4cfd478c67a8e3d9dda0949;hp=241001d30924a04d6e16f8c8d14776ff88bc3a91;hpb=1814b1a0b78770c8ba9e7a0adef56c4c324d4064;p=public-inbox.git diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 241001d3..e9efd29d 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -70,7 +70,7 @@ sub _cleanup_later ($) { my ($self) = @_; $cleanup_avail = cleanup_possible() if $cleanup_avail < 0; return if $cleanup_avail != 1; - $cleanup_timer ||= PublicInbox::DS::later(*cleanup_task); + $cleanup_timer //= PublicInbox::DS::later(\&cleanup_task); $CLEANUP->{"$self"} = $self; } @@ -206,14 +206,13 @@ EOF }; } -sub over ($) { - my ($self) = @_; - my $srch = search($self, 1) or return; - $self->{over} //= eval { - my $over = $srch->{over_ro}; +sub over { + $_[0]->{over} //= eval { + my $srch = search($_[0], 1) or return; + my $over = PublicInbox::Over->new("$srch->{xpfx}/over.sqlite3"); $over->dbh; # may fail $over; - } + }; } sub try_cat { @@ -423,8 +422,8 @@ sub on_unlock { my ($self) = @_; check_inodes($self); my $subs = $self->{unlock_subs} or return; - for (values %$subs) { - eval { $_->on_inbox_unlock($self) }; + for my $obj (values %$subs) { + eval { $obj->on_inbox_unlock($self) }; warn "E: $@ ($self->{inboxdir})\n" if $@; } }