On Mon, 2020-02-10 at 17:38 +0100, Peter Zijlstra wrote:
On Sun, Feb 09, 2020 at 10:24:15AM -0800, Joe Perches wrote:
Maybe this?
This isn't anywhere near RFC compliant,
Nothing really is.
https://metacpan.org/pod/Email::Address
doesn't really do a perfect job either, but I suppose
it'd be possible to use it one day instead.
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
[]
one little nit below..
[]
+sub same_email_addresses {
+ my ($email1, $email2) = @_;
+
+ my ($email1_name, $name1_comment, $email1_address, $comment1) = parse_email($email1);
+ my ($email2_name, $name2_comment, $email2_address, $comment2) = parse_email($email2);
+
+ return $email1_name eq $email2_name &&
+ $email1_address eq $email2_address;
strictly speaking only _address needs be the same for the whole thing to
arrive at the same inbox, but I suppose that for sanity's sake, this
comparison makes sense.
I know, and I believe that's true too.