Skip to content

Instantly share code, notes, and snippets.

package Mojolicious::Lite::GetPost;
use Mojo::Base -base;
use Mojo::Util 'monkey_patch';
sub import {
my $caller = caller;
monkey_patch $caller, 'get_post', sub {
return $caller->app->routes->any([qw(GET POST)] => @_);
};