in reply to CGI::Prototype - let me clarify the response phase for you

But the question becomes where do model actions occur and how do we change pages based on this?
You are thinking about the problem incorrectly. There should *not* be a  MyApp::Update::Validate package. There should be a MyApp::Update::HandleUpdate page which has the logic above and then executes the model actions before returning a response so that the responses can come from subclasses of HandleUpdate... here's the code:

package MyApp::Update::HandleUpdate; # <-- note new package name sub model_actions { } sub response { my $self = shift; my $response; if (not validated) { $response = 'Redo'; } elsif (not authorized) { $response = 'NotAuthorized' } elsif (not authenticated) { $response = 'NotAuthenticated'; } else { # just render here. # if we felt like it, we could have __PACKAGE::success # and __PACKAGE::failure $response='HandleUpdate'; } $response = "MyApp::Login::$response"; return $response; }

Replies are listed 'Best First'.
Re^2: CGI::Prototype - let me clarify the response phase for you
by dragonchild (Archbishop) on Feb 07, 2005 at 14:20 UTC
    Why are you arguing with yourself in public? That looks somewhat schizophrenic ...

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      I, too, have been confused about this. I assume two people used a single account or something strange like that, but I'd be interested in knowing as well.