Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Mojolicious::Plugin::MySub;
- use Mojo::Base 'Mojolicious::Plugin';
- sub register {
- my $self = shift;
- my $app = shift;
- $app->helper( mysub => sub { 1 } );
- }
- 1;
- ## app.pl
- #!/usr/bin/env perl
- use Mojolicious::Lite;
- plugin 'Mojolicious::Plugin::MySub';
- mysub '/test' => sub {
- my $self = shift;
- };
- app->start;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement