diff options
| author | fukachan <fukachan> | 2004-12-08 10:07:44 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-12-08 10:07:44 +0000 |
| commit | e6396d683a2f57a480ae87b47f610ad066428bc3 (patch) | |
| tree | c3e82db05fa675c3e326da73710dbf0f96045fa2 /fml/lib/Mail/Message.pm | |
| parent | d8c2cec2099edd8e3c0889d3520e0e75e30b4d95 (diff) | |
| download | fml8-e6396d683a2f57a480ae87b47f610ad066428bc3.tar.gz fml8-e6396d683a2f57a480ae87b47f610ad066428bc3.tar.bz2 fml8-e6396d683a2f57a480ae87b47f610ad066428bc3.zip | |
implement message_chain_as_array_ref() method.
Diffstat (limited to 'fml/lib/Mail/Message.pm')
| -rw-r--r-- | fml/lib/Mail/Message.pm | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm index 4fe886be..30609c60 100644 --- a/fml/lib/Mail/Message.pm +++ b/fml/lib/Mail/Message.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Message.pm,v 1.96 2004/07/23 15:59:14 fukachan Exp $ +# $FML: Message.pm,v 1.97 2004/07/26 06:39:16 fukachan Exp $ # package Mail::Message; @@ -2692,6 +2692,33 @@ sub find_first_plaintext_message } +=head2 message_chain_as_array_ref() + +return the chain of message objects as ARRAY_REF of OBJ's like this: + + [ Mail::Message, Mail::Message, ... ] + +=cut + + +# Descriptions: return the chain of message objects as ARRAY_REF of OBJ's. +# Arguments: OBJ($self) HASH_REF($args) +# Side Effects: none +# Return Value: ARRAY_REF(OBJ) +sub message_chain_as_array_ref +{ + my ($self, $args) = @_; + my $head_msg = $self->whole_message_body_head(); + my (@chain) = (); + + for (my $m = $head_msg; $m ; $m = $m->{ next }) { + push(@chain, $m); + } + + return \@chain; +} + + =head2 set_log_function() internal use. set CODE REFERENCE to the log function |
