From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: 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.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 711B41FA19 for ; Wed, 2 Sep 2020 11:04:23 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 09/11] wwwaltid: drop unused sqlite3_missing function Date: Wed, 2 Sep 2020 11:04:19 +0000 Message-Id: <20200902110421.30905-10-e@80x24.org> In-Reply-To: <20200902110421.30905-1-e@80x24.org> References: <20200902110421.30905-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It's inlined into the main function, which we'll shorten slightly with the defined-or (`//') operator. Also noticed and fixed a mismatched HTML tag. --- lib/PublicInbox/WwwAltId.pm | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/PublicInbox/WwwAltId.pm b/lib/PublicInbox/WwwAltId.pm index e5476d1f..2818400e 100644 --- a/lib/PublicInbox/WwwAltId.pm +++ b/lib/PublicInbox/WwwAltId.pm @@ -11,16 +11,6 @@ use PublicInbox::Spawn qw(which); use PublicInbox::GzipFilter; our $sqlite3 = $ENV{SQLITE3}; -sub sqlite3_missing ($) { - html_oneshot($_[0], 501, \<sqlite3 not available - -The administrator needs to install the sqlite3(1) binary -to support gzipped sqlite3 dumps. - -EOF -} - sub check_output { my ($r, $bref, $ctx) = @_; return html_oneshot($ctx, 500) if !defined($r); @@ -65,16 +55,12 @@ or EOF } - $sqlite3 //= which('sqlite3'); - if (!defined($sqlite3)) { - return html_oneshot($ctx, 501, \<sqlite3 not available The administrator needs to install the sqlite3(1) binary to support gzipped sqlite3 dumps. - EOF - } # setup stdin, POSIX requires writes <= 512 bytes to succeed so # we can close the pipe right away.