use HTTP::Headers;
use URI::QueryParam;
use Moose::Util::TypeConstraints;
+use Plack::Loader;
use namespace::clean -except => 'meta';
=cut
sub run {
- my ($self, $app) = @_;
+ my ($self, $app, @args) = @_;
+ Carp::cluck("Run");
+ # FIXME - Do something sensible with the options we're passed
+ $self->_run_psgi_app($self->_build_psgi_app($app, @args), @args);
+}
+sub _build_psgi_app {
+ my ($self, $app, @args) = @_;
return sub {
my ($env) = @_;
};
}
+sub _run_psgi_app {
+ my ($self, $psgi_app, @args);
+ # FIXME - Need to be able to specify engine and pass options..
+ Plack::Loader->auto()->run($psgi_app);
+}
+
=head2 $self->write($c, $buffer)
Writes the buffer to the client.
my $self = shift;
my $app = $self->application_name;
Class::MOP::load_class($app);
- my $psgi_app = $app->run($self->_application_args);
- Plack::Runner->run('--app' => $psgi_app);
+ $app->run($self->_application_args);
}
1;