in this case, that method *is* useful for me -- i use it as a diagnostic to
see wth is in the field.
we have a current hot malware vector that is genning up some seriously
broken mime, and outlook in its infinite silliness ingests it happily and
gets owned.
sigh... :-)
i don't have to push the key-val pairs to a hash -- that's where the data
loss happens, as the later ones overwrite the earlier ones. i could walk
the array and then do the right thing with duplicates, for some def'n of
the right thing. :-)
spec is quiet on this point, but does say that "order doesn't matter" for
params.
On Mon, May 23, 2016 at 1:11 AM, Mark Overmeer via RT <
bug-Mail-Box@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=114589 >
>
> * Randy Diffenderfer via RT (bug-Mail-Box@rt.cpan.org) [160522 22:37]:
> > Sun May 22 18:37:20 2016: Request 114589 was acted upon.
> > Transaction: Ticket created by randy.diffenderfer@gmail.com
> > Queue: Mail-Box
> > Subject: Mail::Message::Field attribute issue
> > Requestors: randy.diffenderfer@gmail.com
> > Status: new
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=114589 >
> >
> > consider a header line such:
> > Content-Type: text/plain; foo="foo1"; foo="foo2"; foo="foo3"
> >
> > salient feature is the (bogus?) use of multiple attributes with the same
> > name...
> >
> > $field->attribute( 'foo' )
> > gets a value of 'foo1'
> >
> > but
> > %attrs = $field->attributes( 'foo' )
> > $attrs{'foo'} is 'foo3'
>
> It is a good point. I will include a warning about this, and change the
> example a litte bit. Returned are pairs (key => value), but it does not
> say that all keys are unique. Your assignment converts it into a hash
> so looses the other parameters with the same name.
>
> If I rememebr correctly, only the first attribute with a certain name
> counts. The attributes() method is not really useful: the code is
> more readible when you query for expected parameters.
> --
> Regards,
> MarkOv
>
> ------------------------------------------------------------------------
> Mark Overmeer MSc MARKOV Solutions
> Mark@Overmeer.net solutions@overmeer.net
>
http://Mark.Overmeer.net http://solutions.overmeer.net
>
>
>