App::Cerberus::Plugin - A base class for App::Cerberus plugins
version 0.10
If you want to write a plugin for App::Cerberus then you must provide a request method, which accepts a Plack::Request object as its first argument, and a \%response hashref as its second.
request
\%response
package App::Cerberus::Plugin::Foo; use parent 'App::Cerberus::Plugin'; sub request { my ($self, $request, $response) = @_; $response->{foo} = {.....}; }
Optionally, you can also add an init method, which will be called with any options that were specified in the config file:
init
sub init { my ($self,@args) = @_; ... }
Clinton Gormley <drtech@cpan.org>
This software is copyright (c) 2012 by Clinton Gormley.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Cerberus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Cerberus
CPAN shell
perl -MCPAN -e shell install App::Cerberus
For more information on module installation, please visit the detailed CPAN module installation guide.