diff options
author | Eric Wong <e@yhbt.net> | 2020-07-30 23:43:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-01 00:38:13 +0000 |
commit | 0821af5f21fdb083020ae2e3e79e4227ef59cd4f (patch) | |
tree | 8ecc87f31893549031b94331e9ed02a80ac5bed0 /lib/PublicInbox/MboxGz.pm | |
parent | f60f934cfe1e7a06c853741fbabbbbe3a9a747a4 (diff) | |
download | public-inbox-0821af5f21fdb083020ae2e3e79e4227ef59cd4f.tar.gz |
Although the ->async_next method does not take $self as a receiver, but rather a PublicInbox::HTTP object, we may still retrieve it to be called with the HTTP object via UNIVERSAL->can.
Diffstat (limited to 'lib/PublicInbox/MboxGz.pm')
-rw-r--r-- | lib/PublicInbox/MboxGz.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/MboxGz.pm b/lib/PublicInbox/MboxGz.pm index 967af9c6..913be6e4 100644 --- a/lib/PublicInbox/MboxGz.pm +++ b/lib/PublicInbox/MboxGz.pm @@ -29,8 +29,7 @@ sub mbox_gz { bless $self, __PACKAGE__; my $res_hdr = [ 'Content-Type' => 'application/gzip', 'Content-Disposition' => "inline; filename=$fn.mbox.gz" ]; - $self->psgi_response(200, $res_hdr, \&async_next, - \&PublicInbox::Mbox::async_eml); + $self->psgi_response(200, $res_hdr); } # called by Plack::Util::foreach or similar (generic PSGI) @@ -47,4 +46,6 @@ sub getline { $self->zflush; } +no warnings 'once'; +*async_eml = \&PublicInbox::Mbox::async_eml; 1; |