use warnings;
use base qw(PublicInbox::SearchIdx);
use IO::Handle (); # autoflush
+use PublicInbox::Eml;
sub new {
my ($class, $v2writable, $shard) = @_;
my ($self, $v2w, $r, $shard, $bnote) = @_;
$0 = "pi-v2-shard[$shard]";
$self->begin_txn_lazy;
- while (my $line = $r->getline) {
+ while (my $line = readline($r)) {
$v2w->{current_info} = "[$shard] $line";
if ($line eq "commit\n") {
$self->commit_txn_lazy;
$self->begin_txn_lazy;
my $n = read($r, my $msg, $bytes) or die "read: $!\n";
$n == $bytes or die "short read: $n != $bytes\n";
- my $mime = PublicInbox::MIME->new(\$msg);
+ my $mime = PublicInbox::Eml->new(\$msg);
my $smsg = bless {
bytes => $bytes,
num => $num + 0,