From 96b0a14be7e62742ad06f0a37c3cba61fe6c51e7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Oct 2021 07:00:36 +0000 Subject: treewide: use warn() or carp() instead of env->{psgi.errors} Large chunks of our codebase and 3rd-party dependencies do not use ->{psgi.errors}, so trying to standardize on it was a fruitless endeavor. Since warn() and carp() are standard mechanism within Perl, just use that instead and simplify a bunch of existing code. --- lib/PublicInbox/GzipFilter.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/GzipFilter.pm') diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm index 624c2ed3..c6216171 100644 --- a/lib/PublicInbox/GzipFilter.pm +++ b/lib/PublicInbox/GzipFilter.pm @@ -154,8 +154,7 @@ sub close { sub bail { my $self = shift; if (my $env = $self->{env}) { - eval { $env->{'psgi.errors'}->print(@_, "\n") }; - warn("E: error printing to psgi.errors: $@", @_) if $@; + warn @_, "\n"; my $http = $env->{'psgix.io'} or return; # client abort eval { $http->close }; # should hit our close warn "E: error in http->close: $@" if $@; -- cgit v1.2.3-24-ge0c7