]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Qspawn.pm
qspawn: remove some anonymous subs for psgi_qx
[public-inbox.git] / lib / PublicInbox / Qspawn.pm
index c28566091304c6be0c5d780034f38e5da29ae7b9..22603ca77c49f3dd39b634b6c430b1c670349340 100644 (file)
@@ -155,13 +155,13 @@ sub start {
 # $env is the PSGI env.  As with ``/qx; only use this when output is small
 # and safe to slurp.
 sub psgi_qx {
-       my ($self, $env, $limiter, $qx_cb) = @_;
+       my ($self, $env, $limiter, $qx_cb, $cb_arg) = @_;
        my $scalar = '';
        open(my $qx, '+>', \$scalar) or die; # PerlIO::scalar
        my $end = sub {
                my $err = $_[0]; # $!
                log_err($env, "psgi_qx: $err") if defined($err);
-               finish($self, $env, sub { $qx_cb->(\$scalar) });
+               finish($self, $env, sub { $qx_cb->(\$scalar, $cb_arg) });
                $qx = undef;
        };
        my $rpipe; # comes from popen_rd