From 62f28026e624ed30d620063a0fa92cbedb7f6673 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Jan 2020 08:49:31 +0000 Subject: make Plack optional for non-WWW and non-httpd users 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. --- xt/mem-msgview.t | 3 +-- xt/perf-msgview.t | 2 +- xt/solver.t | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'xt') diff --git a/xt/mem-msgview.t b/xt/mem-msgview.t index 1ea0f559..0c3ad710 100644 --- a/xt/mem-msgview.t +++ b/xt/mem-msgview.t @@ -6,9 +6,8 @@ use IO::Handle; # ->flush use Fcntl qw(SEEK_SET); use PublicInbox::TestCommon; use PublicInbox::Tmpfile; -use PublicInbox::WWW; use Test::More; -my @mods = qw(DBD::SQLite BSD::Resource); +my @mods = qw(DBD::SQLite BSD::Resource PublicInbox::WWW); require_mods(@mods); use_ok($_) for @mods; my $lines = $ENV{NR_LINES} // 100000; diff --git a/xt/perf-msgview.t b/xt/perf-msgview.t index 11bd3a5d..8c9037ee 100644 --- a/xt/perf-msgview.t +++ b/xt/perf-msgview.t @@ -18,7 +18,7 @@ if (require_git(2.19, 1)) { warn "git <2.19, cat-file lacks --unordered, locality suffers\n"; } - +require_mods qw(Plack::Util); use_ok 'Plack::Util'; my $ibx = PublicInbox::Inbox->new({ inboxdir => $inboxdir, name => 'name' }); my $git = $ibx->git; diff --git a/xt/solver.t b/xt/solver.t index 4ff57fe7..5307e120 100644 --- a/xt/solver.t +++ b/xt/solver.t @@ -5,10 +5,10 @@ use strict; use Test::More; use PublicInbox::TestCommon; use PublicInbox::Config; # this relies on PI_CONFIG // ~/.public-inbox/config -use PublicInbox::WWW; my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder); require_mods(qw(DBD::SQLite Search::Xapian), @psgi); use_ok($_) for @psgi; +use_ok 'PublicInbox::WWW'; my $cfg = PublicInbox::Config->new; my $www = PublicInbox::WWW->new($cfg); my $app = sub { -- cgit v1.2.3-24-ge0c7