diff options
author | Eric Wong <e@80x24.org> | 2016-06-20 00:57:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-20 00:57:39 +0000 |
commit | 0c8f677e55941c5c65b263294692899c549ce533 (patch) | |
tree | 17a806c0af928bcdc52932c5b13b2abcc744534f /lib/PublicInbox/Config.pm | |
parent | 4b313dc74bc9bb84a542b7ec920cdb92879e7523 (diff) | |
download | public-inbox-0c8f677e55941c5c65b263294692899c549ce533.tar.gz |
Inboxes are normally created by Config, but having the population logic in Inbox should make it easier to mock for testing.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r-- | lib/PublicInbox/Config.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 43ffba77..ea84da35 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -129,10 +129,8 @@ sub _fill { my $name = $pfx; $name =~ s/\Apublicinbox\.//; $rv->{name} = $name; - my $v = $rv->{address} ||= 'public-inbox@example.com'; - my $p = $rv->{-primary_address} = ref($v) eq 'ARRAY' ? $v->[0] : $v; - $rv->{domain} = ($p =~ /\@(\S+)\z/) ? $1 : 'localhost'; $rv = PublicInbox::Inbox->new($rv); + my $v = $rv->{address}; if (ref($v) eq 'ARRAY') { $self->{-by_addr}->{lc($_)} = $rv foreach @$v; } else { |