From 0a556c99c0db5160f43931422a563c6094b64ea2 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 15 May 2020 16:11:47 -0500 Subject: [PATCH] PublicInbox::Inbox.pm: Default unset address to a one element array PublicInbox::Config.pm::_fill() assumes that address is an array. Therefore when handling an unset address use an array containing a single string, instead of a single string. Signed-off-by: "Eric W. Biederman" --- lib/PublicInbox/Inbox.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 617b692b..002b980f 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -102,7 +102,7 @@ sub _set_limiter ($$$) { sub new { my ($class, $opts) = @_; - my $v = $opts->{address} ||= 'public-inbox@example.com'; + my $v = $opts->{address} ||= [ 'public-inbox@example.com' ]; my $p = $opts->{-primary_address} = ref($v) eq 'ARRAY' ? $v->[0] : $v; $opts->{domain} = ($p =~ /\@(\S+)\z/) ? $1 : 'localhost'; my $pi_config = delete $opts->{-pi_config}; -- 2.48.1