about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-05-07 21:05:55 +0000
committerEric Wong <e@yhbt.net>2020-05-09 08:59:10 +0000
commit0283273a14e1871955f6a9132f4f3f7884ec8a3f (patch)
tree57c0182a8c07d3dfc041b7a818fc6293c7b433f7 /xt
parentfd966061df6a61104935984bed7c28a461a124ff (diff)
downloadpublic-inbox-0283273a14e1871955f6a9132f4f3f7884ec8a3f.tar.gz
We no longer load or use Email::MIME outside of comparison
tests.
Diffstat (limited to 'xt')
-rw-r--r--xt/msgtime_cmp.t12
-rw-r--r--xt/perf-msgview.t2
2 files changed, 7 insertions, 7 deletions
diff --git a/xt/msgtime_cmp.t b/xt/msgtime_cmp.t
index 4ebf5b2c..95d7c64b 100644
--- a/xt/msgtime_cmp.t
+++ b/xt/msgtime_cmp.t
@@ -4,7 +4,7 @@
 use strict;
 use Test::More;
 use PublicInbox::TestCommon;
-use PublicInbox::MIME;
+use PublicInbox::Eml;
 use PublicInbox::Inbox;
 use PublicInbox::Git;
 use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
@@ -48,7 +48,7 @@ sub quiet_is_deeply ($$$$$) {
 sub compare {
         my ($bref, $oid, $type, $size) = @_;
         local $SIG{__WARN__} = sub { diag "$oid: ", @_ };
-        my $mime = PublicInbox::MIME->new($$bref);
+        my $mime = PublicInbox::Eml->new($$bref);
         my $hdr = $mime->header_obj;
         my @cur = msg_datestamp($hdr);
         my @old = Old::msg_datestamp($hdr);
@@ -116,7 +116,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) {
@@ -131,7 +131,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) {
@@ -149,7 +149,7 @@ sub msg_date_only ($) {
 
 # Favors Received header for sorting globally
 sub msg_timestamp ($) {
-        my ($hdr) = @_; # Email::MIME::Header
+        my ($hdr) = @_; # PublicInbox::Eml
         my $ret;
         $ret = msg_received_at($hdr) and return time_response($ret);
         $ret = msg_date_only($hdr) and return time_response($ret);
@@ -158,7 +158,7 @@ sub msg_timestamp ($) {
 
 # Favors the Date: header for display and sorting within a thread
 sub msg_datestamp ($) {
-        my ($hdr) = @_; # Email::MIME::Header
+        my ($hdr) = @_; # 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/xt/perf-msgview.t b/xt/perf-msgview.t
index a4445959..30fc07dc 100644
--- a/xt/perf-msgview.t
+++ b/xt/perf-msgview.t
@@ -38,7 +38,7 @@ my $obuf = '';
 my $m = 0;
 
 my $cb = sub {
-        $mime = PublicInbox::MIME->new(shift);
+        $mime = PublicInbox::Eml->new(shift);
         PublicInbox::View::multipart_text_as_html($mime, $ctx);
         ++$m;
         $obuf = '';