On Tue, 10 Jun 2003, Steve Comrie wrote: > In CGI::Application as long as you are using the $self->query() method to > grab the your $cgi object you are not doing multiple queries. > > CGI::App needs to reads the 'rm' value from the cgi object so that it knows > which run-mode to call. Therefore it must load a new instance of CGI.pm (or > CGI::Simple) in-order to operate. It then stores the $cgi object so that it > can be retrieved any time you make a call to the query method.
Perl handles it so that repeated executions of 'require "CGI"' only actually fetch and compile the code once. In a persistent environment the fetch/compilation cost occurs on the first use of ->query() and no other times afterward. > > > The 'new process' is the main issue that I am concerned with. > > > Someday I will care about the other ways. I may switch to > > > using CGI::Simple even those it is not that big of a saving for me. > > > That is the one that gets me thinking. Am I spawning processes or am I > > passing data more? This does not involve processes or forking. Even if every use of ->query caused CGI.pm to be loaded, compiled and new object returned (and none of that happens) it would still all be in the same perl process. None of the Above ben Jore, Minneapolis, Hawthorne, 45�00'09" -93�17'39" --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
