1 package App::SCS::Plugin::Actions;
3 use Module::Runtime qw(use_module);
7 with 'App::SCS::Role::Plugin';
9 has mount_at => (is => 'ro', default => sub { 'actions' });
11 has dispatcher => (is => 'lazy', builder => sub {
13 use_module('Plack::App::PSGIBin')->new(
14 root => io->dir($self->app->share_dir)->catdir('actions')
18 sub page_dispatchers {
20 my $base = $self->mount_at;
21 "/${base}/..." => sub { $self->dispatcher },