[dancer-users] playing with path_info before matching routes
Yanick Champoux
yanick at babyl.dyndns.org
Wed Dec 4 00:26:32 GMT 2013
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
More information about the dancer-users
mailing list