From f8629575e505828e8d19d430aea68699802bd820 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 26 Feb 2016 03:51:47 +0000 Subject: [PATCH] httpd: avoid loading our WWW-specific code early We want this to be usable as a generic httpd for other Free Software projects, so do not force users to load our WWW code at compile-time. --- public-inbox-httpd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public-inbox-httpd b/public-inbox-httpd index 772333e8..b871e3de 100644 --- a/public-inbox-httpd +++ b/public-inbox-httpd @@ -8,13 +8,9 @@ use warnings; use Plack::Util; use PublicInbox::Daemon; use PublicInbox::HTTP; -use PublicInbox::WWW; use Plack::Request; use Plack::Builder; -PublicInbox::WWW->preload; -my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; my %httpds; -my $config; my $app; my $refresh = sub { if (@ARGV) { @@ -24,6 +20,8 @@ my $refresh = sub { "$0 runs in /, command-line paths must be absolute\n"; } } else { + require PublicInbox::WWW; + PublicInbox::WWW->preload; my $www = PublicInbox::WWW->new; $app = eval { my $deflate_types = eval { -- 2.48.1