diff options
author | Eric Wong <e@yhbt.net> | 2020-05-07 21:05:49 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-05-09 08:59:10 +0000 |
commit | 3b1b7abf814dbc7f2a737b2ca0e12b0fa518ff44 (patch) | |
tree | cde4545eac215cffda996d8aea47791f6d2e3095 /lib/PublicInbox/MboxGz.pm | |
parent | 57af9c8d0bedafac3267b5b42f963bb8aa5c2ea1 (diff) | |
download | public-inbox-3b1b7abf814dbc7f2a737b2ca0e12b0fa518ff44.tar.gz |
Since PublicInbox::Eml doesn't parse MIME subparts up front, it can replace most uses of Email::Simple without performance penalty. This will eventually allow us to lower overall internal API footprint by not having to keep the MIME vs Simple distinction.
Diffstat (limited to 'lib/PublicInbox/MboxGz.pm')
-rw-r--r-- | lib/PublicInbox/MboxGz.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/MboxGz.pm b/lib/PublicInbox/MboxGz.pm index e506de3d..f7fc4afc 100644 --- a/lib/PublicInbox/MboxGz.pm +++ b/lib/PublicInbox/MboxGz.pm @@ -3,7 +3,7 @@ package PublicInbox::MboxGz; use strict; use warnings; -use Email::Simple; +use PublicInbox::Eml; use PublicInbox::Hval qw/to_filename/; use PublicInbox::Mbox; use Compress::Raw::Zlib qw(Z_FINISH Z_OK); @@ -41,7 +41,7 @@ sub getline { my $buf = delete($self->{buf}); while (my $smsg = $self->{cb}->($ctx)) { my $mref = $ctx->{-inbox}->msg_by_smsg($smsg) or next; - my $h = Email::Simple->new($mref)->header_obj; + my $h = PublicInbox::Eml->new($mref)->header_obj; my $err = $gz->deflate( PublicInbox::Mbox::msg_hdr($ctx, $h, $smsg->{mid}), |