This saves us some memory for the hash slot in the common case
the `cloneurl' file doesn't exist.
---
 lib/PublicInbox/Inbox.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 3ba92c99..1d5fc708 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -216,11 +216,11 @@ sub description {
 
 sub cloneurl {
        my ($self) = @_;
-       ($self->{cloneurl} //= do {
+       $self->{cloneurl} // do {
                my $s = try_cat("$self->{inboxdir}/cloneurl");
                my @urls = split(/\s+/s, $s);
-               scalar(@urls) ? \@urls : undef
-       }) // [];
+               scalar(@urls) ? ($self->{cloneurl} = \@urls) : undef;
+       } // [];
 }
 
 sub base_url {
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to