]> Sergey Matveev's repositories - public-inbox.git/commitdiff
use string ref for Email::Simple->new
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 19 Mar 2018 08:14:35 +0000 (08:14 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 19 Mar 2018 08:16:34 +0000 (08:16 +0000)
Email::Simple is slightly faster this way, and Email::MIME
and PublicInbox::MIME both wrap that.

lib/PublicInbox/Import.pm

index 8406c9e268866fc23f9c4758f511994a964cfeea..e20c6e031f6fb14a64373637a631f8e1ff9edc93 100644 (file)
@@ -122,7 +122,7 @@ sub check_remove_v1 {
        $n = read($r, my $lf, 1);
        defined($n) or die "read final byte of cat-blob failed: $!";
        die "bad read on final byte: <$lf>" if $lf ne "\n";
-       my $cur = PublicInbox::MIME->new($buf);
+       my $cur = PublicInbox::MIME->new(\$buf);
        my $cur_s = $cur->header('Subject');
        $cur_s = '' unless defined $cur_s;
        my $cur_m = $mime->header('Subject');