pcouderc has asked for the wisdom of the Perl Monks concerning the following question:
I authenticate in Login.pm sub nolog, I define userid and I redirect to "upsmichel/menu", I expect "login/menu.html.ep" to be rendered but instead I am routed to a callback ?sub startup { my $self = shift; my $r = $self->routes; $r->get('/:layout')->to('login#nolog'); $r->get('/:layout/logout')->to('login#logout'); my $auth = $r->under( sub { return defined($self->session('userid' +)) } ); $auth->get('/:layout/menu')->to('login#menu'); $r->any('/:layout/:dummy')->to('login#nolog');}
Wed Nov 25 10:03:48 2015] [debug] GET "/upsmichel/nolog". [Wed Nov 25 10:03:48 2015] [debug] Routing to controller "Myapp::Contr +oller::Login" and action "nolog". [Wed Nov 25 10:03:48 2015] [debug] Rendering cached template "login/no +log.html.ep". [Wed Nov 25 10:03:48 2015] [debug] Rendering cached template "layouts/ +upsmichel.html.ep". [Wed Nov 25 10:03:48 2015] [debug] 200 OK (0.061906s, 16.154/s). [Wed Nov 25 10:04:02 2015] [debug] POST "/upsmichel/nolog". [Wed Nov 25 10:04:02 2015] [debug] Routing to controller "Myapp::Contr +oller::Login" and action "nolog". [Wed Nov 25 10:04:02 2015] [debug] 302 Found (0.031328s, 31.920/s). [Wed Nov 25 10:04:02 2015] [debug] GET "/upsmichel/menu". [Wed Nov 25 10:04:02 2015] [debug] Routing to a callback. [Wed Nov 25 10:04:02 2015] [debug] Nothing has been rendered, expectin +g delayed response.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is mojolicious "routing to a callback" ?
by Corion (Patriarch) on Nov 25, 2015 at 09:29 UTC | |
by pcouderc (Monk) on Nov 25, 2015 at 11:20 UTC | |
by Anonymous Monk on Nov 25, 2015 at 11:34 UTC | |
by Corion (Patriarch) on Nov 25, 2015 at 12:03 UTC | |
by pcouderc (Monk) on Nov 25, 2015 at 12:26 UTC | |
by Anonymous Monk on Nov 25, 2015 at 22:53 UTC | |
| |
|
Re: Why is mojolicious "routing to a callback" ?
by ctilmes (Vicar) on Nov 25, 2015 at 19:24 UTC | |
by pcouderc (Monk) on Nov 26, 2015 at 07:45 UTC |