| 1 | package Miril::App::PSGI; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use autodie; | ||
| 6 | |||
| 7 | use Miril::CGI::Application; | ||
| 8 | use CGI::Application::Emulate::PSGI; | ||
| 9 | |||
| 10 | sub app { | ||
| 11 | my ($self, $miril_dir, $site) = @_; | ||
| 12 | return CGI::Application::Emulate::PSGI->handler( sub { | ||
| 13 | my $miril = Miril::CGI::Application->new( | ||
| 14 | PARAMS => { | ||
| 15 | miril_dir => $miril_dir, | ||
| 16 | site => $site, | ||
| 17 | }, | ||
| 18 | ); | ||
| 19 | $miril->run; | ||
| 20 | } ); | ||
| 21 | } | ||
| 22 | |||
| 23 | 1; |