1 package App::SCS::Role::Plugin;
5 with 'App::SCS::Role::WithConfig';
8 is => 'ro', weak_ref => 1, required => 1,
9 handles => [ 'pages' ],
12 sub page_plugins { () }
14 sub default_page_plugins { () }
16 sub page_dispatchers { () }
18 sub provides_pages { () }
20 sub register { return }
23 my ($self, $env) = @_;
24 my ($command, @argv) = @{$env->{argv}};
25 return unless $command;
26 return unless $self->can(my $meth = "run_command_${command}");
27 $self->$meth({ argv => \@argv, %$env });