Do you know where your variables are? | |
PerlMonks |
Multiple routes that execute the same actionby perl_help26 (Beadle) |
on Mar 28, 2014 at 08:17 UTC ( [id://1080045]=perlquestion: print w/replies, xml ) | Need Help?? |
perl_help26 has asked for the wisdom of the Perl Monks concerning the following question: Hello, I was wondering if there was a way to make several routes run the same code... I would like a straight method similar to: any ['get', 'post'] => '/myaction' => sub {} For example: 'get' => any['/myaction1/:param1','/myaction2/:param2'] => sub {} I know there can be workarounds such as redirection or replacing myaction1 and myaction2 by /:action but is there anything straightforward no processing? Thanksss
Back to
Seekers of Perl Wisdom
|
|