1 # Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 package PublicInbox::Address;
8 grep { defined } map { $_->address() } parse_email_addresses($_[0])
12 grep { defined } map {
14 my $addr = $_->address;
15 $n = $_->user if defined($addr) && $n eq $addr;
17 } parse_email_addresses($_[0]);
21 require Email::Address::XS;
22 Email::Address::XS->import(qw(parse_email_addresses));
23 *emails = \&xs_emails;
28 require PublicInbox::AddressPP;
29 *emails = \&PublicInbox::AddressPP::emails;
30 *names = \&PublicInbox::AddressPP::names;