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.
use PublicInbox::GzipFilter;
our $sqlite3 = $ENV{SQLITE3};
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);
sub check_output {
my ($r, $bref, $ctx) = @_;
return html_oneshot($ctx, 500) if !defined($r);
- $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>sqlite3 not available
The administrator needs to install the sqlite3(1) binary
to support gzipped sqlite3 dumps.</pre>
# setup stdin, POSIX requires writes <= 512 bytes to succeed so
# we can close the pipe right away.
# setup stdin, POSIX requires writes <= 512 bytes to succeed so
# we can close the pipe right away.