about summary refs log tree commit homepage
path: root/t/psgi_mount.t
diff options
context:
space:
mode:
Diffstat (limited to 't/psgi_mount.t')
-rw-r--r--t/psgi_mount.t17
1 files changed, 8 insertions, 9 deletions
diff --git a/t/psgi_mount.t b/t/psgi_mount.t
index 751c13b7..d29df054 100644
--- a/t/psgi_mount.t
+++ b/t/psgi_mount.t
@@ -9,15 +9,14 @@ my ($tmpdir, $for_destroy) = tmpdir();
 my $maindir = "$tmpdir/main.git";
 my $addr = 'test-public@example.com';
 my $cfgpfx = "publicinbox.test";
-my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape);
+my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape
+        Plack::Builder Plack::App::URLMap);
 require_mods(@mods);
 use_ok $_ foreach @mods;
+use_ok 'PublicInbox::WWW';
 use PublicInbox::Import;
 use PublicInbox::Git;
 use PublicInbox::Config;
-use PublicInbox::WWW;
-use Plack::Builder;
-use Plack::App::URLMap;
 my $config = PublicInbox::Config->new(\<<EOF);
 $cfgpfx.address=$addr
 $cfgpfx.inboxdir=$maindir
@@ -41,11 +40,11 @@ EOF
 }
 
 my $www = PublicInbox::WWW->new($config);
-my $app = builder {
-        enable 'Head';
-        mount '/a' => builder { sub { $www->call(@_) } };
-        mount '/b' => builder { sub { $www->call(@_) } };
-};
+my $app = builder(sub {
+        enable('Head');
+        mount('/a' => builder(sub { sub { $www->call(@_) } }));
+        mount('/b' => builder(sub { sub { $www->call(@_) } }));
+});
 
 test_psgi($app, sub {
         my ($cb) = @_;