summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7eda704)
I missed this instance of file slurping into an Email::MIME-like
object the other week when tearing Email::MIME usage out.
$ibx = PublicInbox::InboxWritable->new($ibx, {nproc=>1});
my $cfgfile = "$tmpdir/config";
local $ENV{PI_CONFIG} = $cfgfile;
$ibx = PublicInbox::InboxWritable->new($ibx, {nproc=>1});
my $cfgfile = "$tmpdir/config";
local $ENV{PI_CONFIG} = $cfgfile;
-my $file = 't/data/0001.patch';
-open my $fh, '<', $file or die "open: $!";
-my $raw = do { local $/; <$fh> };
my $im = $ibx->importer(0);
my $im = $ibx->importer(0);
-my $mime = PublicInbox::Eml->new($raw);
+my $file = 't/data/0001.patch';
+my $mime = eml_load($file);
my $mid = mid_clean($mime->header('Message-Id'));
ok($im->add($mime), 'add message to be edited');
$im->done;
my $mid = mid_clean($mime->header('Message-Id'));
ok($im->add($mime), 'add message to be edited');
$im->done;