]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/MIME.pm
remove most internal Email::MIME usage
[public-inbox.git] / lib / PublicInbox / MIME.pm
index 456eed64b8c444647c75bb1c21fa10ec512ad484..9077386ac2123fab3c28e57d7e8d65f239e9a48b 100644 (file)
@@ -3,6 +3,9 @@
 #
 # 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.
+#
 # It monkey patches the "parts_multipart" subroutine with patches
 # from Matthew Horsfall <wolfsage@gmail.com> at:
 #
@@ -24,6 +27,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 +105,6 @@ sub parts_multipart {
 }
 }
 
+no warnings 'once';
+*each_part = \&PublicInbox::MsgIter::em_each_part;
 1;