From 65ff86f333a1f8276943248efef7fa2a64afe9e3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 25 Feb 2016 03:10:51 +0000 Subject: www: make interface more OO This allows multiple instances the WWW app from running within the same process space --- examples/public-inbox.psgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi index c4a8903e..e3e42152 100644 --- a/examples/public-inbox.psgi +++ b/examples/public-inbox.psgi @@ -10,7 +10,7 @@ PublicInbox::WWW->preload; use Plack::Request; use Plack::Builder; my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; - +my $www = PublicInbox::WWW->new; builder { enable 'Chunked'; if ($have_deflater) { @@ -25,8 +25,5 @@ builder { # See Plack::Middleware::ReverseProxy documentation for details # enable 'ReverseProxy'; enable 'Head'; - sub { - my $req = Plack::Request->new(@_); - PublicInbox::WWW::run($req, $req->method); - } + sub { $www->call(@_) }; } -- cgit v1.2.3-24-ge0c7