+
+sub pop3_url {
+ my ($self, $ctx) = @_;
+ $self->{-pop3_url} //= do {
+ my $ps = $self->{'pop3server'} //
+ $ctx->{www}->{pi_cfg}->get_all('publicinbox.pop3server');
+ my $group = $self->{newsgroup};
+ my @urls;
+ ($ps && $group) and
+ @urls = map { m!\Apop3?s?://! ? $_ : "pop3://$_" } @$ps;
+ if (my $mi = $self->{'pop3mirror'}) {
+ my @m = map { m!\Apop3?s?://! ? $_ : "pop3://$_" } @$mi;
+ my %seen; # List::Util::uniq requires Perl 5.26+
+ @urls = grep { !$seen{$_}++ } (@urls, @m);
+ }
+ my $n = 0;
+ for (@urls) { $n += s!/+\z!! }
+ warn <<EOM if $n;
+W: pop3server and/or pop3mirror URLs should not end with trailing slash `/'
+EOM
+ \@urls;
+ }
+}