Web::Simple::Role - Define roles for Web::Simple applications
package MyApp; use Web::Simple; with MyApp::Role; sub dispatch_request { ... }
and in the role:
package MyApp::Role; use Web::Simple::Role; around dispatch_request => sub { my ($orig, $self) = @_; return ( $self->$orig, sub (GET + /baz) { ... } ); };
Now MyApp can also dispatch /baz
MyApp
/baz
See Web::Simple for authors.
See Web::Simple for the copyright and license.
To install Web::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::Simple
CPAN shell
perl -MCPAN -e shell install Web::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.