diff options
author | Eric Wong <e@yhbt.net> | 2020-03-30 00:18:42 -0500 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-30 17:49:28 +0000 |
commit | 2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f (patch) | |
tree | bd039357e25d31f14caf0144175eae14cfdeafc2 /lib/PublicInbox/WwwStream.pm | |
parent | 99ba1517d9a636d72b014c3d89f176575bdfcc59 (diff) | |
download | public-inbox-2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f.tar.gz |
wwwstream::oneshot => html_oneshot
And use Exporter to make our life easier, since WwwAltId was using a non-existent PublicInbox::WwwResponse namespace in error paths which doesn't get noticed by `perl -c' or exercised by tests on normal systems. Fixes: 6512b1245ebc6fe3 ("www: add endpoint to retrieve altid dumps")
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 985e0262..915a71ba 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -9,6 +9,8 @@ package PublicInbox::WwwStream; use strict; use warnings; +use base qw(Exporter); +our @EXPORT_OK = qw(html_oneshot); use bytes (); # length use PublicInbox::Hval qw(ascii_html prurl); our $TOR_URL = 'https://www.torproject.org/'; @@ -170,7 +172,7 @@ sub getline { delete $self->{cb} ? _html_end($self) : undef; } -sub oneshot { +sub html_oneshot ($$;$) { my ($ctx, $code, $sref) = @_; my $self = bless { ctx => $ctx, |