[Dancer-users] messed up routes

Alexis Sukrieh sukria at sukria.net
Sat Nov 12 15:37:23 CET 2011


Hello,

2011/10/20 Mr. Puneet Kishor <punk.kish at gmail.com>:
> as much as I love Dancer, and I really truly do... as I said when I first used Dancer, it is a breath of fresh air in the world of Perl, Dancer has become really, really unreliable for me.  [...]
>        get '/video/:page_name/:movie' => sub {
>                ..
>                debug "using layout main_video";
>                layout 'main_video';
>                template 'video_mov', \%template_opts;
>        };

You're doing it wrong. It's not "unreliable", it's just that you're
using a setting (which is global and persistent) as a pramater for a
route response (which is supposed to be scopped to the request it's
responding to).

If you want to use (or change) the layout to be used for a specific
template call, then you should use the option provided for doing so.

See perldoc Dancer ("template").


More information about the Dancer-users mailing list