]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
inbox: name variable for values loop iterator
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 3b5ac970d07cf43af6d86b656d92606f108cefc9..e9efd29d40a4b46f993bef2075653f632cb43544 100644 (file)
@@ -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;
 }
 
@@ -422,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 $@;
        }
 }