* Casey West via RT <bug-Email-Simple@rt.cpan.org> [2006-07-25T16:06:49]
Show quoted text> On Jul 25, 2006, at 11:45 AM, via RT wrote:
> > Perhaps there should be a method that returns every key => pair in
> > order?
>
> How close does the mixin from Email::Simple::Headers get you?
It won't help much. It returns shuffle(uniq(headernames)), basically.
A simple solution will almost certainly involve adding an extra, optional arg
to header(), or a new header-like method, so one can write:
$email->header('Received', 3);
to get the third (4th?) received header.
Then, a routine that returns @{$self->{order}} and a routine that returns each
header pair in order is simple.
In fact, the latest Subversion version of Email::Simple effectively implements
this within _headers_as_string, which now properly respects RFC2822's request
to not reorder headers during transport or reproduction.
--
rjbs