From: Tomas Doran Date: Thu, 14 Jan 2010 22:24:09 +0000 (+0000) Subject: Doc fixes, get a bit nearer to working with mod_perl again X-Git-Tag: 5.89000~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9560b708797123875e4743b5dac70c69fbc4a3ef Doc fixes, get a bit nearer to working with mod_perl again --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index ee4477a..67993f1 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -744,18 +744,28 @@ header. The amount of input data that has already been read. -=head2 $self->run($c) +=head2 $self->run($app, $server) -Start the engine. Implemented by the various engine classes. +Start the engine. Builds a PSGI application and calls the +run method on the server passed in.. =cut sub run { my ($self, $app, $server, @args) = @_; + $server ||= Plack::Loader->auto(); # We're not being called from a script, + # so auto detect mod_perl or whatever # FIXME - Do something sensible with the options we're passed $server->run($self->build_psgi_app($app, @args)); } +=head2 build_psgi_app ($app, @args) + +Builds and returns a PSGI application closure, wrapping it in the reverse proxy +middleware if the using_frontend_proxy config setting is set. + +=cut + sub build_psgi_app { my ($self, $app, @args) = @_;