__PACKAGE__->mk_classdata($_)
for qw/components arguments dispatcher engine log dispatcher_class
engine_class context_class request_class response_class stats_class
- setup_finished/;
+ setup_finished psgi_app/;
__PACKAGE__->dispatcher_class('Catalyst::Dispatcher');
__PACKAGE__->engine_class('Catalyst::Engine');
);
}
- # engine instance
$class->engine( $engine->new );
+ $class->psgi_app( $class->engine->build_psgi_app($class) );
}
=head2 $c->setup_home
sub run {
my ($self, $app, $server, @args) = @_;
# FIXME - Do something sensible with the options we're passed
- $server->run($self->_build_psgi_app($app, @args));
+ $server->run($self->build_psgi_app($app, @args));
}
-sub _build_psgi_app {
+sub build_psgi_app {
my ($self, $app, @args) = @_;
my $psgi_app = sub {
}
$class->import;
- my $app = $class->engine->_build_psgi_app($class);
+ my $app = $class->psgi_app;
$request = sub { local_request( $app, @_ ) };
}