[dancer-users] What path_info() does?

Octavian Rasnita orasnita at gmail.com
Mon Mar 18 17:24:26 GMT 2013


Can you please tell me what should do the following line of code?


I thought that it should set the current path to /login and execute the 
subroutine associated with it, but it doesn't seem to do that or I am not 
doing something right.

I tried:

use Dancer2;

hook before => sub {

get '/' => sub {
return '/';

get '/login' => sub {
return '/login';


When accessing http://localhost/
it displays just / and not /login as I thought that it should do.


More information about the dancer-users mailing list