about summary refs log tree commit homepage
path: root/lib/PublicInbox/MboxGz.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-25 07:50:50 +0000
committerEric Wong <e@80x24.org>2019-12-27 20:00:37 +0000
commit07c51ae017dae0ea221ba756e9c6ec46f6a587de (patch)
tree2a9dcbec3ee224c45b09c1cc5212605ba86a8498 /lib/PublicInbox/MboxGz.pm
parentdb748229054d52cdcc95843db5d827b49defeaff (diff)
downloadpublic-inbox-07c51ae017dae0ea221ba756e9c6ec46f6a587de.tar.gz
Another place where we can rid ourselves of most anonymous subs
by passing the $ctx arg to the callback.
Diffstat (limited to 'lib/PublicInbox/MboxGz.pm')
-rw-r--r--lib/PublicInbox/MboxGz.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/MboxGz.pm b/lib/PublicInbox/MboxGz.pm
index ef560426..2b873451 100644
--- a/lib/PublicInbox/MboxGz.pm
+++ b/lib/PublicInbox/MboxGz.pm
@@ -42,7 +42,7 @@ sub getline {
         my $ctx = $self->{ctx} or return;
         my $gz = $self->{gz};
         my $buf = delete($self->{buf});
-        while (my $smsg = $self->{cb}->()) {
+        while (my $smsg = $self->{cb}->($ctx)) {
                 my $mref = $ctx->{-inbox}->msg_by_smsg($smsg) or next;
                 my $h = Email::Simple->new($mref)->header_obj;