$smsg->{lines} = $eml->body_raw =~ tr!\n!\n!;
my $mids = mids_for_index($eml);
my $refs = $smsg->parse_references($eml, $mids);
- $mids->[0] //= $smsg->{mid} //= $eml->{-lei_fake_mid};
- $smsg->{mid} //= '';
+ $mids->[0] //= do {
+ $smsg->{mid} //= '';
+ $eml->{-lei_fake_mid};
+ };
my $subj = $smsg->{subject};
my $xpath;
if ($subj ne '') {
sub create {
my ($self) = @_;
my $fn = $self->{filename} // do {
- Carp::confess('BUG: no {filename}') unless $self->{dbh};
+ croak('BUG: no {filename}') unless $self->{dbh};
return;
};
unless (-r $fn) {
}
-sub blob_exists {
- my ($self, $oidhex) = @_;
- my $sth = $self->dbh->prepare_cached(<<'', undef, 1);
-SELECT COUNT(*) FROM xref3 WHERE oidbin = ?
-
- $sth->bind_param(1, pack('H*', $oidhex), SQL_BLOB);
- $sth->execute;
- $sth->fetchrow_array;
-}
-
1;