my ($out, $ctx) = @_;
require PublicInbox::WwwStream;
$ctx->{www} = My::MockObject->new(style => '');
- my $www_stream = PublicInbox::WwwStream->new($ctx);
+ my $www_stream = PublicInbox::WwwStream::init($ctx);
print $out $www_stream->_html_top, '<pre>' or die;
}
}
sub mime2atom {
- my ($out, $astream, $mime, $ctx) = @_;
- my $smsg = bless { mime => $mime }, 'PublicInbox::Smsg';
- if (defined(my $str = $astream->feed_entry($smsg))) {
+ my ($out, $astream, $eml, $ctx) = @_;
+ my $smsg = bless {}, 'PublicInbox::Smsg';
+ $smsg->populate($eml);
+ if (defined(my $str = $astream->feed_entry($smsg, $eml))) {
print $out $str or die;
}
}