From b98a16aec63d8773697b81ca0f699e65bb7076e8 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 18 Sep 2007 00:30:02 -0700 Subject: [PATCH] remove getmailbody from errorlib --- scripts/errorlib.in | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/scripts/errorlib.in b/scripts/errorlib.in index 85bc9ba6..a2e90161 100755 --- a/scripts/errorlib.in +++ b/scripts/errorlib.in @@ -1,7 +1,7 @@ # -*- perl -*- use Mail::Address; -use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522); +use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522 getmailbody); use Debbugs::Packages qw(:all); use Debbugs::Common qw(:all); use Debbugs::Status qw(:all); @@ -22,29 +22,6 @@ sub sani { return $in; } -sub getmailbody { - my $entity = shift; - my $type = $entity->effective_type; - if ($type =~ m#text/(?!html|enriched)# or - $type eq 'application/pgp') { - return $entity->bodyhandle; - } elsif ($type eq 'multipart/alternative') { - # RFC 2046 says we should use the last part we recognize. - for my $part (reverse $entity->parts) { - my $ret = getmailbody($part); - return $ret if $ret; - } - } else { - # For other multipart types, we just pretend they're - # multipart/mixed and run through in order. - for my $part ($entity->parts) { - my $ret = getmailbody($part); - return $ret if $ret; - } - } - return undef; -} - sub get_addresses { return map { $_->address() } -- 2.39.5