At 1:49 PM -0700 10/17/01, Walt Knowles wrote: > > >Converting all the globals to Module variables has been a piece of cake, but >I've run into one big issue. Depending on how you log into the system, the >user will connect to different databases. When they do this, I store the >Database Handle from DBI/DBD as $main::dbh.
Hmm... If you use $main::dbh everywhere (instead of $dbh = DBI->conn...), it should work, but this is considered bad form. Since $main:: is local to the Apache process, it's technically global, and that's bad. I'd suggest changing your code (as we did for our site) to pass $dbh around to each method and object. Good luck, Rob -- "Only two things are infinite: The universe, and human stupidity. And I'm not sure about the former." --Albert Einstein