]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
www: avoid potential auto-vivification on ibx->{url}
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index df140cacbec177191839a7ffd310b132e11c566e..b0bb9dcc288daa328cfd44da340d4ae74a274a2b 100644 (file)
@@ -250,7 +250,8 @@ sub base_url {
        }
        # called from a non-PSGI environment (e.g. NNTP/POP3):
        $self->{-base_url} ||= do {
-               my $url = $self->{url}->[0] or return undef;
+               my $url = $self->{url} // return undef;
+               $url = $url->[0] // return undef;
                # expand protocol-relative URLs to HTTPS if we're
                # not inside a web server
                $url = "https:$url" if $url =~ m!\A//!;