From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8EE1C2049B for ; Sun, 25 Dec 2016 10:36:56 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/4] githttpbackend: minor readability improvement Date: Sun, 25 Dec 2016 10:36:50 +0000 Message-Id: <20161225103653.8325-2-e@80x24.org> In-Reply-To: <20161225103653.8325-1-e@80x24.org> References: <20161225103653.8325-1-e@80x24.org> List-Id: Use a more meaningful variable name for the Qspawn object, since this module is the reference for its use. --- lib/PublicInbox/GitHTTPBackend.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index a069fd9..86b8ebc 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -206,11 +206,11 @@ sub serve_smart { } $env{GIT_HTTP_EXPORT_ALL} = '1'; $env{PATH_TRANSLATED} = "$git_dir/$path"; - my %rdr = ( 0 => fileno($in) ); - my $x = PublicInbox::Qspawn->new([qw(git http-backend)], \%env, \%rdr); + my $rdr = { 0 => fileno($in) }; + my $qsp = PublicInbox::Qspawn->new([qw(git http-backend)], \%env, $rdr); my ($fh, $rpipe); my $end = sub { - if (my $err = $x->finish) { + if (my $err = $qsp->finish) { err($env, "git http-backend ($git_dir): $err"); } $fh->close if $fh; # async-only @@ -258,7 +258,7 @@ sub serve_smart { # holding the input here is a waste of FDs and memory $env->{'psgi.input'} = undef; - $x->start($limiter, sub { # may run later, much later... + $qsp->start($limiter, sub { # may run later, much later... ($rpipe) = @_; $in = undef; if ($async) { -- EW