diff options
author | Eric Wong <e@80x24.org> | 2020-09-02 11:04:19 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-03 20:11:03 +0000 |
commit | 7f8e6ba85dd5e41efdfb518e3b86bceda3ee027e (patch) | |
tree | 111d6969f1da6bd35f8f10412d2d606fd86d2c2b | |
parent | 3d83cc1dae085b0bc2044cb82aa86e35a8b5172a (diff) | |
download | public-inbox-7f8e6ba85dd5e41efdfb518e3b86bceda3ee027e.tar.gz |
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.
-rw-r--r-- | lib/PublicInbox/WwwAltId.pm | 16 |
1 files changed, 1 insertions, 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, \<<EOF); -<pre>sqlite3 not available - -The administrator needs to install the sqlite3(1) binary -to support gzipped sqlite3 dumps.</pre> -</pre> -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, \<<EOF); + $sqlite3 //= which('sqlite3') // return html_oneshot($ctx, 501, \<<EOF); <pre>sqlite3 not available The administrator needs to install the sqlite3(1) binary to support gzipped sqlite3 dumps.</pre> -</pre> EOF - } # setup stdin, POSIX requires writes <= 512 bytes to succeed so # we can close the pipe right away. |