logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Web::Simple::Role - Define roles for Web::Simple applications

Authors

       See Web::Simple for authors.

Name

       Web::Simple::Role - Define roles for Web::Simple applications

Synopsis

         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"

See Also