![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: Structuring multiple CGI::Application modules IIby dragonchild (Archbishop) |
on Jun 28, 2004 at 17:37 UTC ( #370265=note: print w/replies, xml ) | Need Help?? |
I think you've got your design backwards. You're trying to go to the home page first. Generally, the steps are:
This means that your cookie-checking method is in the base class. Your pages are in the child classes. cgiapp_prerun() will call your cookie-checking method to determine if it should redirect to the login page or not. The runmode method won't even be executed unless the cookie is there and has been verified. Generally, one has one C::A child to do logging in, logging out, password changes, etc. Then, you have a few other C::A children that do actual content generation. So, you'd actually have two CGI scripts - one for login and one for show_survey. Both would inherit from your baseclass. ------
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose I shouldn't have to say this, but any code, unless otherwise stated, is untested
In Section
Seekers of Perl Wisdom
|
|