In article <[EMAIL PROTECTED]>, Adam Gent wrote: > Hi All, > > Just need to check something before I commit to it. > > I am right in assuming that cgiapp_init, is call when the cgi application is > first loaded and will only run once, no matter how many run modes are called > with the application. > > I.e. if I had a form in one run mode which then passed the results into a > runmode within the existing from, cgiapp_init would not rerun. > > And am I also right in assuming that cgiapp_prerun will run before any run > mode is executed, so that it would be a perfect place to put in session > validation..
Adam, Here's my understanding from a quick review of the source code: ( vim `perldoc -l CGI::Application` ) There are a couple of possible cases, depending on your intent: 1. If you are going to return the second mode from within the first, each of cgiapp_init and cgapp_prerun will be run once each. 2. If you are thinking about calling the instance script, once to access each run mode, then each of cgiapp_init and cgiapp_prerun will be run twice, once for each invocation of the script. There is more on Sessions with CGI::Application here: http://twiki.med.yale.edu/twiki2/bin/view/CGIapp/SessionsWithCgiApp However, there are certainly Other Ways to Do It. Mark --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]