in reply to Re^3: Review: CGI::Prototype
in thread Review: CGI::Prototype
I don't think this will work very well. Often, mainscreen() itself took input from some other form. Now I'll need to pile on yet more logic inside mainscreen() to know which runmode it's being called by.
Well, it depends on your mainscreen(). My mainscreen() is always the very first page, which by definition doesn't take any input.
In my years of cgiapp development, I actually haven't needed it any other way. That's probably b/c I don't develop the more complex structures, but I've done countless e-commerce and complicated database applications in this "simple" manner.
Now that I think about it, there are a few other options. Remember in each runmode you got access to the $self (cgiapp class), which you can call its get_current_runmode() to see what runmode it's being called by. You also have access to the CGI object within. You can also stuff/access something inside the cgiapp object with its own param() method. Lastly, you can also pass along arguments to the various runmodes.
You have to put that logic somewhere... ;)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Depends...
by hardburn (Abbot) on Dec 02, 2004 at 16:30 UTC | |
by Purdy (Hermit) on Dec 02, 2004 at 16:48 UTC | |
by demerphq (Chancellor) on Dec 02, 2004 at 18:24 UTC | |
by hardburn (Abbot) on Dec 02, 2004 at 19:23 UTC | |
by hardburn (Abbot) on Dec 02, 2004 at 18:01 UTC |