From 3b0f03b899a1230a097d8362d366cac97f263b63 Mon Sep 17 00:00:00 2001 From: fukachan Date: Sat, 5 May 2001 06:39:41 +0000 Subject: nuke data_type(). replace data_type() with get_data_type(). define header_data_type() method to retrieve the data type of the whole mail message. --- fml/lib/Mail/Message.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'fml/lib/Mail/Message.pm') diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm index c2291c4f..e560ca62 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.19 2001/04/15 14:33:36 fukachan Exp $ +# $FML: Message.pm,v 1.20 2001/04/15 15:29:29 fukachan Exp $ # package Mail::Message; @@ -555,7 +555,7 @@ sub find my $mp = $self; for ( ; $mp; $mp = $mp->{ next }) { if ($debug) { print " msg->find(", $type, " eq $type)\n";} - if ($type eq $mp->data_type()) { + if ($type eq $mp->get_data_type()) { if ($debug) { print " msg->find($type match) = $mp\n";} return $mp; } @@ -565,7 +565,7 @@ sub find my $regexp = $args->{ data_type_regexp }; my $mp = $self; for ( ; $mp; $mp = $mp->{ next }) { - my $type = $mp->data_type(); + my $type = $mp->get_data_type(); if ($debug) { print " msg->find(", $type, "=~ /$regexp/)\n";} if ($type =~ /$regexp/i) { if ($debug) { print " msg->find($type match) = $mp\n";} @@ -578,18 +578,19 @@ sub find } -=head2 C +=head2 C -return the C string. -It is extracted from C
object. +return the C string. It is the whole message type which is +speculated from header C. =cut -sub data_type +sub header_data_type { my ($self) = @_; - $self->{ data_type } || undef; + my $hdr = $self->rfc822_message_header(); + $self->_header_data_type($hdr); } -- cgit v1.2.1