about summary refs log tree commit homepage
path: root/lib/PublicInbox/Eml.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-05-07 21:05:51 +0000
committerEric Wong <e@yhbt.net>2020-05-09 08:59:10 +0000
commit88645f747bd43c7fc374d8bfb908dab4e6028825 (patch)
tree45058eb07449277be995f9de3d6443b18b8d8fcc /lib/PublicInbox/Eml.pm
parent46742d95647c7a80cb2f60d5c134717dd91e22e2 (diff)
downloadpublic-inbox-88645f747bd43c7fc374d8bfb908dab4e6028825.tar.gz
Since we're getting rid of Email::MIME, get rid of
Email::MIME::ContentType, too; since we may introduce
speedups down the line specific to our codebase.
Diffstat (limited to 'lib/PublicInbox/Eml.pm')
-rw-r--r--lib/PublicInbox/Eml.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/Eml.pm b/lib/PublicInbox/Eml.pm
index 0c23bed0..1988bdb3 100644
--- a/lib/PublicInbox/Eml.pm
+++ b/lib/PublicInbox/Eml.pm
@@ -33,10 +33,9 @@ use Text::Wrap qw(wrap); # stdlib, we need Perl 5.6+ for $huge
 
 my $MIME_Header = find_encoding('MIME-Header');
 
-# TODO remove these dependencies
-use Email::MIME::ContentType;
+use PublicInbox::EmlContentFoo qw(parse_content_type parse_content_disposition);
 use Email::MIME::Encodings;
-$Email::MIME::ContentType::STRICT_PARAMS = 0;
+$PublicInbox::EmlContentFoo::STRICT_PARAMS = 0;
 
 our $MAXPARTS = 1000; # same as SpamAssassin
 our $MAXDEPTH = 20; # seems enough, Perl sucks, here
@@ -108,7 +107,7 @@ sub header_raw {
 # pick the first Content-Type header to match Email::MIME behavior.
 # It's usually the right one based on historical archives.
 sub ct ($) {
-        # Email::MIME::ContentType::content_type:
+        # PublicInbox::EmlContentFoo::content_type:
         $_[0]->{ct} //= parse_content_type(header($_[0], 'Content-Type'));
 }