From: Eric Wong (Contractor, The Linux Foundation) Date: Mon, 19 Mar 2018 08:14:35 +0000 (+0000) Subject: use string ref for Email::Simple->new X-Git-Tag: v1.1.0-pre1~167 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=e0a7508d4d58efdf5f0cdb7f402a9af60e5324fd use string ref for Email::Simple->new Email::Simple is slightly faster this way, and Email::MIME and PublicInbox::MIME both wrap that. --- diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 8406c9e2..e20c6e03 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -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');