"Christopher S. Hyne" wrote: > > On Tue, 4 Dec 2001 12:06:56 -0600, "Elizabeth Vaughn" > <[EMAIL PROTECTED]> wrote : > > > If this is still completely Greek, maybe Christopher would like to take a > > stab at it. He seems to do a much better job of stating the problem in > far > > fewer words. > > It's funny Elizabeth, I was just thinking you were doing a much better job > than me explain the problem. > > Here's how my little 'trouble' arises. > > I have an application. If no other runmode is specifed, by default it runs > something like 'show_login_page()' in MyApp::Login. This one is plain and > simple CGI::App the way it was meant to be. The user enters username and > password and hits submit. A runmode like 'validate_login()' is called in > MyApp::Login. If the username/password is valid then a runmode like > 'show_homepage' will be run in MyApp::Home. Because of the runmode/print > way CGI::App currently runs, the output I get is this: > > <sample output> > Content-type: text/html > > Content-type: text/html > > <... output of show_homepage() goes here ...> > > </sample output> > > If I could do runmode/runmode/print all would be fine.
Ok, I think I've run into something like this. I spent a lot of time figuring out a fancy CGI::App internal way to do it, and then I finally settled on this: Instead of calling the second run mode internally, I call it externally, by issuing an HTTP redirect with a query string. It's still roughly the same logic of "go to this other place in the application", just a little bit different execution. I found that this method makes debugging easier because the path from life to death of the process is shorter-- It's now broken it into two "life cycles", one for the first run mode, and one for the second run mode. -mark . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer [EMAIL PROTECTED] Summersault, LLC v: 765-939-9301 ext 223 website development . . . . . http://www.summersault.com/ . . . . . . . --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
