Hi Chad -- > I'm thinking of using CGI::Application in a new project with > mod_perl, > and I know the two work together quite well... But I've only seen it > done where the application object is instantiated and run at the same > time from within the handler. This isn't the most efficient > way to do > it when using mod_perl. > > What I would like to do is instantiate the object in the body of the > handler's package, and reuse it over and over by setting the > r parameter > and calling $app->run(), like this:
That is not the way CGI::Application works. The CGI-App object expects to have a lifespan of exactly one request. You refer to "efficiency", and mod_perl. CGI::Application was developed from the start to work efficiently with mod_perl. Using Apache::Registry, the code is efficiently cached, so very little unnecessary work is done between requests. If you believe there is any other inefficiency, please provide dprofpp profiling data to back up your theory. TTYL, -Jesse- -- Jesse Erlbaum The Erlbaum Group [EMAIL PROTECTED] Phone: 212-684-6161 Fax: 212-684-6226 --------------------------------------------------------------------- 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]
