On Sat, 2005-01-08 at 19:07 +0000, Angie Ahl wrote:
> Will this work?

Yes.

> Will I have problems with variables becoming "shared" ie vars values
> getting mixed up between connections?

No, not if you call DBI->connect() every time you want a connection.
You only get in trouble if you keep your own copies of the database
handles around and then get them mixed up.

> Is PerlSetVar the best way to pass values from httpd.conf to perl
> securely?

It's a good way, although there are plenty of others.  I use a separate
config file usually.

> Do I need to open/close the connection in each of the modules too or
> can I pass the $dbh object to each of my external subroutines, or is
> there an even better way.

Either of those will work, or you could make your own "get_dbh()"
function that handles the dir_config stuff and calls DBI->connect() and
just use that from your subs.  

- Perrin

Reply via email to