3 use Module::Runtime qw(use_module);
7 with 'App::SCS::Role::WithConfig';
9 has plugins => (is => 'ro', default => sub { [] });
11 has pages => (is => 'lazy');
15 return use_module('App::SCS::PageSet')->new(
16 base_dir => io->dir($self->config->{share_dir})->catdir('pages'),
19 map $_->page_plugins, reverse @{$self->plugins}
22 map $_->default_page_plugins, @{$self->plugins}
28 has web => (is => 'lazy');
32 return use_module('App::SCS::Web')->new(
39 $self->load_plugin(Core => {});
40 foreach my $spec (@{$self->config->{plugins}||[]}) {
41 $self->load_plugin(@$spec);
46 my ($self, $name, $config) = @_;
49 use_module("App::SCS::Plugin::${name}")->new(