Re: preloading modules and apache::dbi

mike cardeiro <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
> From: Perrin Harkins <[email protected]>



> However, if you are trying to make the handle persistent
>yourself, by putting it in a global variable or something similar,
>that will be a problem.  You have to close all connections you open
>during startup, and open new ones in the child processes.
>


heres kinda sorta whats going on.   The library Main.pm is preloaded at apache startup.  it exports a variable $dbh which is empty.

When a cgi script runs and uses Main.pm it runs an initialize subroutine from Main.pm.  In that subroutine the  $dbh variable gets the return from DBI::connect.  


Since Main.pm is preloaded in apache startup, is there 1 $dbh variable shared amongst all httpd processes; or does each process have it's own $dbh variable?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.