in reply to Multiple routes that execute the same action
Sure. If you want to reuse code, you simply give it a name, and use that name twice.
sub handle_my_request { ... } for my $route ('/myaction1/:param1', '/myaction2/:param2') { get $route, \&handle_my_request; }
Most frameworks also allow you to write the code as methods in a controller class (see for example Mojolicious::Guides::Growing).
In Section
Seekers of Perl Wisdom