From: Matt S Trout Date: Sun, 25 Sep 2011 02:04:51 +0000 (+0000) Subject: update Plack usage X-Git-Tag: v0.009~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Simple.git;a=commitdiff_plain;h=2bc99ccd7582eeb2970e3779bcd2833b95646700 update Plack usage --- diff --git a/Changes b/Changes index 353a8a3..0bfbf7a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Change log for Web::Simple + - Update Plack usage to call ::Handler:: classes not ::Server:: - Assume FastCGI mode if STDIN is a socket (works some places env vars fail) - Change CLI mode to print status line and headers to STDERR and content to STDOUT so that './myapp /foo.html >foo.html' works sanely diff --git a/lib/Web/Simple/Application.pm b/lib/Web/Simple/Application.pm index 235b871..8382116 100644 --- a/lib/Web/Simple/Application.pm +++ b/lib/Web/Simple/Application.pm @@ -45,14 +45,14 @@ sub run_if_script { sub _run_cgi { my $self = shift; - require Plack::Server::CGI; - Plack::Server::CGI->run($self->to_psgi_app); + require Plack::Handler::CGI; + Plack::Handler::CGI->new->run($self->to_psgi_app); } sub _run_fcgi { my $self = shift; - require Plack::Server::FCGI; - Plack::Server::FCGI->run($self->to_psgi_app); + require Plack::Handler::FCGI; + Plack::Handler::FCGI->new->run($self->to_psgi_app); } sub to_psgi_app {