> 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. This variable has the scope of > "the length of processing the request" and then should become undef.
The best way to do this under mod_perl is to store it in $r->pnotes(). It's documented in perldoc Apache, as well as the guide and the eagle book. - Perrin