diff options
author | Eric Wong <e@yhbt.net> | 2020-01-10 08:49:31 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-11 21:16:26 +0000 |
commit | 62f28026e624ed30d620063a0fa92cbedb7f6673 (patch) | |
tree | 8cdd2a4646c3304e5a6072e824fe5da2aa05eea8 /script/public-inbox-httpd | |
parent | f018d5cc70f3a6983e4ec188ae62a729a8b31157 (diff) | |
download | public-inbox-62f28026e624ed30d620063a0fa92cbedb7f6673.tar.gz |
Some users just want to run -mda, -watch, and/or -nntpd. Let them run just those without forcing them to pull in a bunch of dependencies.
Diffstat (limited to 'script/public-inbox-httpd')
-rwxr-xr-x | script/public-inbox-httpd | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd index b2464f4e..09da505e 100755 --- a/script/public-inbox-httpd +++ b/script/public-inbox-httpd @@ -1,15 +1,18 @@ #!/usr/bin/perl -w -# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org> +# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> # # Standalone HTTP server for public-inbox. use strict; -use warnings; -use Plack::Util; use PublicInbox::Daemon; -use PublicInbox::HTTP; -use PublicInbox::HTTPD; -use Plack::Builder; +BEGIN { + for (qw(Plack::Builder Plack::Util)) { + eval("require $_") or die "E: Plack is required for $0\n"; + } + Plack::Builder->import; + require PublicInbox::HTTP; + require PublicInbox::HTTPD; +} my %httpds; my $app; my $refresh = sub { |