]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ExtMsg.pm
wwwstream: use parent.pm and no warnings
[public-inbox.git] / lib / PublicInbox / ExtMsg.pm
index 4d753a7e8f00feca8089d0e8f6caa469bcc6dc0b..d7917b34fb420788d64ea6bdbbd68dc1d8e4d436 100644 (file)
@@ -9,7 +9,7 @@ package PublicInbox::ExtMsg;
 use strict;
 use warnings;
 use PublicInbox::Hval qw(ascii_html prurl mid_href);
-use PublicInbox::WwwStream;
+use PublicInbox::WwwStream qw(html_oneshot);
 use PublicInbox::Smsg;
 our $MIN_PARTIAL_LEN = 16;
 
@@ -30,7 +30,7 @@ our @EXT_URL = map { ascii_html($_) } (
 sub PARTIAL_MAX () { 100 }
 
 sub mids_from_mset { # Search::retry_reopen callback
-       [ map { PublicInbox::Smsg::from_mitem($_)->mid } $_[0]->items ];
+       [ map { PublicInbox::Smsg::from_mitem($_)->{mid} } $_[0]->items ];
 }
 
 sub search_partial ($$) {
@@ -159,7 +159,7 @@ sub ext_msg {
        $ctx->{-html_tip} = $s .= '</pre>';
        $ctx->{-title_html} = $title;
        $ctx->{-upfx} = '../';
-       PublicInbox::WwwStream->response($ctx, $code);
+       html_oneshot($ctx, $code);
 }
 
 sub ext_urls {
@@ -197,7 +197,7 @@ sub exact {
                                        qq(<a\nhref="$u$href/">$u$html/</a>\n)
                                } @$found),
                        $ext_urls, '</pre>');
-       PublicInbox::WwwStream->response($ctx, $code);
+       html_oneshot($ctx, $code);
 }
 
 1;