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::Controller::Login" and action "nolog". [Wed Nov 25 10:03:48 2015] [debug] Rendering cached template "login/nolog.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::Controller::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, expecting delayed response.