Hi,

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

request->path_info('/login');

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:

#!/usr/bin/perl
use Dancer2;

hook before => sub {
   request->path_info('/login');
};

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

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

dance;

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

--Octavian

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

Reply via email to