I've been using CGI::Application for a couple of small projects and for
the simplistic things I'm trying to do, it's worked quite well.  However
now I want to do something a little more advanced and I'm not sure I
understand how to do so in the CGI::Application paradigm.  Here's a
little flowchart:

                      form<------+
                        |        |
                        |        ^
                        v        |
                    validation   |
                        |        |
                        v        |
            thanks<-----+----->error!
                    pass  fail


form, thanks, and error map quite naturally to run-modes.  But how to
handle validation?  I tried to make it a seperate run-mode and in the
associated subroutine

if (valid)
{
  $q->param('rm', 'thanks');
}
else
{
  $q->param('rm', 'error');
}
return;

...but this just prints out the word thanks or error.

So what is the correct way of doing this?

-- 
Jaldhar H. Vyas <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to