On Sunday 18 September 2016 17:26:11 Ricardo Signes wrote:
> * p...@cpan.org [2016-09-17T19:05:51]
> 
> > $class->from_mime_string() will take raw MIME encoded string and
> > returns new object of $class (which will have decoded string
> > parts) $object->as_mime_string() will convert (Unicode) $object
> > into raw MIME encoded string
> > 
> > It is OK for you?
> 
> That all sounded fine.  I think the paragraph I left quoted
> overspecifies a bit.  Whether the object is storing things decoded
> or not isn't any of our concern as long as it has those two methods.
>  But I think we're on the same page.

OK!

> The Email::Address::XS use should be optional, as right now people
> can install Email::MIME in an compiler-free environment.  We can add
> it as a recommended prereq.

Currently passing string values of From/To/Cc/Bcc/... headers into 
header_str() method is broken in Email::MIME. That is because 
Email::MIME currently uses Email::Address for generating those header 
values (which is broken) and then MIME encode those broken outputs.

Email::Address::XS has (looks like) correctly implemented formatter and 
so it is needed to correctly MIME encode From/To/Cc/Bcc headers.

I started working on Email::MIME::Header::AddressList module (which will 
have from_mime_string() and as_mime_string() methods for From/To/Cc/Bcc 
headers) and this module cannot work without Email::Address::XS.

So what to do with currently broken From/To/Cc/Bcc/... headers 
(incorrectly MIME encoded) which Email::MIME generate? I do not see 
other option as dependency on Email::Address::XS.

As compromise could be: Whole Email::MIME will not depends on module 
Email::Address::XS. But if somebody want to pass Unicode string (via 
header_str) to Email::MIME then MIME encoding will be done via 
Email::MIME::Header::AddressList (which will use Email::Address::XS). So 
if caller encodes manually From/To/Cc/... headers and pass them via 
header_raw() then Email::Address::XS will not be needed.

But when it pass Unicode string for From/To/Cc/.. headers via header_str 
then it Email::MIME will loads Email::MIME::Header::AddressList which 
depends on Email::Address::XS...

It is acceptable?

And can be Email::MIME::Header::AddressList part of Email-MIME 
distribution (even if only this module will depends on XS)?

Reply via email to