Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Address CPAN distribution.

Report information
The Basics
Id: 42573
Status: resolved
Priority: 0/
Queue: Email-Address

People
Owner: Nobody in particular
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.889
Fixed in: (no value)



Subject: Overload cmp too
Since the objects stringify, many (indirect) users may not realize they're working with Email::Address objects until they try sort them, and things blow-up. It shouldn't be too hard to provide a cmp overload that builds on the the existing stringification.
I'm not sure that falling back to stringification will be the best behavior, although it will be better than nothing. Given the following three stringifications: albert@example.com "Betty O'Connor" <betty@example.com> charlie@example.com ...I think sorting by stringification will be weird. Nonetheless, I have enabled overload fallback. The specific behavior of cmp may become less surprising in the future. -- rjbs