sub auto : Private { my ($self, $c) = @_; if ($c->controller eq $c->controller('Login') || ## The following test eventually starts failing ## while running the register controller: $c->controller eq $c->controller('Register') ) { return 1; } if (!$c->user_exists) { $c->response->redirect($c->uri_for('/login')); } ...