Re: Apache::DBI

[prev] [thread] [next] [Date index for 2005/01/08]

From: Perrin Harkins
Subject: Re: Apache::DBI
Date: 19:49 on 08 Jan 2005
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

(message missing)

Apache::DBI
Angie Ahl 19:07 on 08 Jan 2005

Re: Apache::DBI
Charles P. Frank 19:38 on 08 Jan 2005

Re: Apache::DBI
Perrin Harkins 19:49 on 08 Jan 2005

Re: Apache::DBI
Martin Moss 16:06 on 09 Jan 2005

Apache::DBI
Ian Joyce 04:01 on 30 Jan 2005

Re: Apache::DBI
Perrin Harkins 04:25 on 30 Jan 2005

Re: Apache::DBI
Ian Joyce 05:17 on 30 Jan 2005

Re: Apache::DBI
Perrin Harkins 18:18 on 30 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52