From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/3] qspawn: import Scalar::Util::blessed properly
Date: Fri, 13 Jan 2023 10:35:48 +0000 [thread overview]
Message-ID: <20230113103550.3020126-2-e@80x24.org> (raw)
In-Reply-To: <20230113103550.3020126-1-e@80x24.org>
Scalar::Util may not be loaded by other modules in the future.
---
lib/PublicInbox/Qspawn.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm
index c2d8fd73..0044c1f6 100644
--- a/lib/PublicInbox/Qspawn.pm
+++ b/lib/PublicInbox/Qspawn.pm
@@ -28,6 +28,7 @@ package PublicInbox::Qspawn;
use v5.12;
use PublicInbox::Spawn qw(popen_rd);
use PublicInbox::GzipFilter;
+use Scalar::Util qw(blessed);
# n.b.: we get EAGAIN with public-inbox-httpd, and EINTR on other PSGI servers
use Errno qw(EAGAIN EINTR);
@@ -234,8 +235,9 @@ sub psgi_return_init_cb { # this may be PublicInbox::HTTPD::Async {cb}
my $r = rd_hdr($self) or return;
my $env = $self->{psgi_env};
my $filter;
- if (ref($r) eq 'ARRAY' && Scalar::Util::blessed($r->[2]) &&
- $r->[2]->can('attach')) {
+
+ # this is for RepoAtom since that can fire after parse_cgi_headers
+ if (ref($r) eq 'ARRAY' && blessed($r->[2]) && $r->[2]->can('attach')) {
$filter = pop @$r;
}
$filter //= delete($env->{'qspawn.filter'}) // (ref($r) eq 'ARRAY' ?
next prev parent reply other threads:[~2023-01-13 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 10:35 [PATCH 0/3] coderepo-related cleanups + sha256 Eric Wong
2023-01-13 10:35 ` Eric Wong [this message]
2023-01-13 10:35 ` [PATCH 2/3] viewvcs: use git(1) for coderepo access Eric Wong
2023-01-13 10:35 ` [PATCH 3/3] coderepo: consolidate git --batch-check users Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230113103550.3020126-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).