in reply to current route of perl dancer

You might be looking for the Dancer::Request method path. You get at a Dancer::Request object via request.

# in hook before_template_render => sub { my $tokens = shift; # Make the path available in every template. $tokens->{current_route} = request->path; }; # in views/layouts/ <p>Route: <% current_route %></p>

Anything more elaborate than what I did, you'll probably want to create a custom helper.

Replies are listed 'Best First'.
Re^2: current route of perl dancer
by lightoverhead (Pilgrim) on Feb 10, 2014 at 19:46 UTC
    Thank you guys. Nice solution!