Hi,
I've got my IIS7 Catalyst envioronment up and running

and before I charge ahead with development, I was hoping for some clarification on a few things.
$c->go / $c->forward / $c->detach / $c->visit
I understand that forward / visit are linked, is it correct that forward only runs the method/action called and then returns back to the previous segment it was called from?
So auto/begin/end are not executed in the controller where the method is being called?
and so detach calls just the controller method and doesn't return or run auto/begin/end
and go will not return but will execute the auto/begin/end.
I've read this in the manual
Quote:
| Keep in mind that the end method used is that of the caller action. So a $c->detach inside a forwarded action would run the end method from the original action requested. |
So it seems if you forward and then that call uses detach, the end in the detach command isn't executed but the one in the forward is?
I'm confused.
I thought detach stops all returning calls and runs the action/method without going back, so how come the end in the calling forward is executed?
How do I call a method in a controller from either another controller or a model, which does not return back and finish any other chained calls, but does execute auto/begin/end in the newly called controller?
is it $c->go ?
Basically I have a controller 'Login' with a Private method and also an 'end' method.
Code:
sub locked :Private {
$c->stash->{message} = 'Sorry, system is currently undergoing maintenance, please try again later.';
}
sub end :Private {
$c->stash->{css} = 'login';
$c->stash(template => 'login.tp');
}
The first thing my app does before anything is authenticate the user. Part of that process is to check if the system flag for maintenace is set, if so, I don't care where in the chain of calls the application might be, I want it to stop, not return to anywhere, run the 'locked' method in the Login controller, including the 'end' method in the Login controller.
is that detach, go, visit, forward or something else?
Clarification is appreciated.