about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Import.pm8
-rw-r--r--lib/PublicInbox/MIME.pm3
-rw-r--r--lib/PublicInbox/MsgTime.pm8
-rw-r--r--lib/PublicInbox/TestCommon.pm3
4 files changed, 12 insertions, 10 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 98aa7785..07d18599 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -213,13 +213,13 @@ sub get_mark {
 }
 
 # returns undef on non-existent
-# ('MISMATCH', Email::MIME) on mismatch
-# (:MARK, Email::MIME) on success
+# ('MISMATCH', PublicInbox::Eml) on mismatch
+# (:MARK, PublicInbox::Eml) on success
 #
 # v2 callers should check with Xapian before calling this as
 # it is not idempotent.
 sub remove {
-        my ($self, $mime, $msg) = @_; # mime = Email::MIME
+        my ($self, $mime, $msg) = @_; # mime = PublicInbox::Eml or Email::MIME
 
         my $path_type = $self->{path_type};
         my ($path, $err, $cur, $blob);
@@ -375,7 +375,7 @@ sub clean_tree_v2 ($$$) {
 # returns undef on duplicate
 # returns the :MARK of the most recent commit
 sub add {
-        my ($self, $mime, $check_cb, $smsg) = @_; # mime = Email::MIME
+        my ($self, $mime, $check_cb, $smsg) = @_;
 
         my ($name, $email, $at, $ct, $subject) = extract_cmt_info($mime, $smsg);
         my $path_type = $self->{path_type};
diff --git a/lib/PublicInbox/MIME.pm b/lib/PublicInbox/MIME.pm
index b795b93b..9077386a 100644
--- a/lib/PublicInbox/MIME.pm
+++ b/lib/PublicInbox/MIME.pm
@@ -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:
 #
diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm
index 920e8f8a..8596f01c 100644
--- a/lib/PublicInbox/MsgTime.pm
+++ b/lib/PublicInbox/MsgTime.pm
@@ -138,7 +138,7 @@ sub time_response ($) {
 }
 
 sub msg_received_at ($) {
-        my ($hdr) = @_; # Email::MIME::Header
+        my ($hdr) = @_; # PublicInbox::Eml
         my @recvd = $hdr->header_raw('Received');
         my ($ts);
         foreach my $r (@recvd) {
@@ -153,7 +153,7 @@ sub msg_received_at ($) {
 }
 
 sub msg_date_only ($) {
-        my ($hdr) = @_; # Email::MIME::Header
+        my ($hdr) = @_; # PublicInbox::Eml
         my @date = $hdr->header_raw('Date');
         my ($ts);
         foreach my $d (@date) {
@@ -168,7 +168,7 @@ sub msg_date_only ($) {
 
 # Favors Received header for sorting globally
 sub msg_timestamp ($;$) {
-        my ($hdr, $fallback) = @_; # Email::MIME::Header
+        my ($hdr, $fallback) = @_; # PublicInbox::Eml
         my $ret;
         $ret = msg_received_at($hdr) and return time_response($ret);
         $ret = msg_date_only($hdr) and return time_response($ret);
@@ -177,7 +177,7 @@ sub msg_timestamp ($;$) {
 
 # Favors the Date: header for display and sorting within a thread
 sub msg_datestamp ($;$) {
-        my ($hdr, $fallback) = @_; # Email::MIME::Header
+        my ($hdr, $fallback) = @_; # PublicInbox::Eml
         my $ret;
         $ret = msg_date_only($hdr) and return time_response($ret);
         $ret = msg_received_at($hdr) and return time_response($ret);
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 978c3cd7..d952ee6d 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -8,7 +8,6 @@ use parent qw(Exporter);
 use Fcntl qw(FD_CLOEXEC F_SETFD F_GETFD :seek);
 use POSIX qw(dup2);
 use IO::Socket::INET;
-use PublicInbox::MIME; # temporary
 our @EXPORT = qw(tmpdir tcp_server tcp_connect require_git require_mods
         run_script start_script key2sub xsys xqx mime_load eml_load);
 
@@ -23,7 +22,7 @@ sub mime_load ($) {
 sub eml_load ($) {
         my ($path, $cb) = @_;
         open(my $fh, '<', $path) or die "open $path: $!";
-        binmode $fh;
+        require PublicInbox::Eml;
         PublicInbox::Eml->new(\(do { local $/; <$fh> }));
 }