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
2013/3/18 Octavian Rasnita <orasnita@gmail.com>:
Can you please tell me what should do the following line of code?
request->path_info('/login');
It should do what you expect, i think. I am not sure, what is wrong, but i checked out 3 facts: 1. before hook gets hit 2. path_info is changet to '/login' 3. it works with Dancer v1.3 Seems like bug to me. -- Wbr, Kõike hääd, Gunnar
participants (2)
-
Octavian Rasnita -
WK