smallvaluesof2 has asked for the wisdom of the Perl Monks concerning the following question:
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')); } ...
I am tweaking CSS/JS error handling and run the Register page repeatedly with deliberate input errors (empty input field etc). After a few cycles I modify the register controller or the appropriate template/form definition.
After a while the above test fails even though I know (from Catalyst debug output) the Register controller is being invoked and control passes to the Login controller.
Once this happens, it continues to happens until I restart Catalyst. Sometimes the same thing also happens to the login controller so Catalyst loops indefinitely redirecting to the login controller.
I am running Catalyst with the -r option and have been modifying the the register controller. Is it possible that this is introducing some instability?
I can't imagine that Catalyst would be so flaky in production so I can only assume that either the -r option introduces some instability (and I can live with that) or that I am somehow corrupting Catalyst by doing something dumb.Any thoughts appreciated.
Using Catalyst 5.7014/ CGI::FormBuilder 3.0501 / Ubuntu 8.10 on a dedicated development VM. Running catalyst with the -r option
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catalyst controller comparison fails in Root controller auto()
by CountZero (Bishop) on Jan 11, 2009 at 08:43 UTC | |
by smallvaluesof2 (Novice) on Jan 11, 2009 at 14:28 UTC | |
|
Re: Catalyst controller comparison fails in Root controller auto()
by hobbs (Monk) on Jan 11, 2009 at 06:10 UTC | |
by smallvaluesof2 (Novice) on Jan 11, 2009 at 14:15 UTC | |
by hobbs (Monk) on Jan 11, 2009 at 21:22 UTC | |
by smallvaluesof2 (Novice) on Jan 12, 2009 at 20:58 UTC | |
|
Re: Catalyst controller comparison fails in Root controller auto()
by Anonymous Monk on Jan 13, 2009 at 15:15 UTC |