);
}
-has _static_handler => (is => 'lazy');
-
-sub _build__static_handler {
+has _static_handler => (is => 'lazy', builder => sub {
my ($self) = @_;
use_module('Plack::App::File')->new(
root => $self->app->share_dir->catdir('static')
);
-}
+});
+
+has _ssi_handler => (is => 'lazy', builder => sub {
+ use_module('Plack::Middleware::SSI')->new
+});
sub dispatch_request {
my ($self) = @_;
+ sub { $self->_ssi_handler },
sub (/**.*) {
my $path = $_[1];
return unless $path =~ s/(?=\/|^)-//;
my @args = @{$env->{argv}};
my $r = use_module('Plack::Runner')->new(
server => 'Starman',
- app => $self->app->web->to_psgi_app
+ app => use_module('Plack::Middleware::SSI')->wrap(
+ $self->app->web->to_psgi_app
+ )
);
$r->parse_options(@args);
$r->set_options(argv => \@args);