diff options
Diffstat (limited to 'lib/PublicInbox/MIME.pm')
-rw-r--r-- | lib/PublicInbox/MIME.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/PublicInbox/MIME.pm b/lib/PublicInbox/MIME.pm index 456eed64..831a3d19 100644 --- a/lib/PublicInbox/MIME.pm +++ b/lib/PublicInbox/MIME.pm @@ -3,6 +3,11 @@ # # The license for this file differs from the rest of public-inbox. # +# We no longer load this in any of our code outside of maintainer +# tests for compatibility. PublicInbox::Eml is favored throughout +# our codebase for performance and safety reasons, though we maintain +# Email::MIME-compatibility in mail injection and indexing code paths. +# # It monkey patches the "parts_multipart" subroutine with patches # from Matthew Horsfall <wolfsage@gmail.com> at: # @@ -24,6 +29,7 @@ use strict; use warnings; use base qw(Email::MIME); use Email::MIME::ContentType; +use PublicInbox::MsgIter (); $Email::MIME::ContentType::STRICT_PARAMS = 0; if ($Email::MIME::VERSION <= 1.937) { @@ -101,4 +107,6 @@ sub parts_multipart { } } +no warnings 'once'; +*each_part = \&PublicInbox::MsgIter::em_each_part; 1; |