On 13-12-03 07:23 AM, Matt Mallard wrote:

get '/l/*/*' => sub {
     my  ($lang,  $page)  =  splat;

     template ("$lang/$page");
};

It's a bit ugly though...

Just for giggles, the megasplat can also used to make the whole thing a little less painful. Funnily enough, the Perl Advent entry of yesterday features an example that is very close to that very use case: http://www.perladvent.org/2013/2013-12-02.html


Joy,
`/anick
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to