At 9:58 AM + 12/18/01, Ged Haywood wrote:
Hi all,
On Mon, 17 Dec 2001, Stas Bekman wrote (privately, discussing a book review:):
Ged wrote:
book_extract
If you want to use CApache::DBI but you have both situations on
one machine, at the time of writing the only solution is to run two
mod_perl enabled servers, one which uses CApache::DBI and one
which does not.
/book_extract
[META: Stas: Could one not simply patch Apache::DBI to
permit disconnects from one of the databases? -- Ged.]
That's probably a good idea. Go ahead and suggest it to the author/list?
Author/List: Is this a Good Idea?
I've not tested or tried this, but wouldn't this patch work?
--- ApacheDBI-0.88/DBI.pm Fri Jan 12 13:59:00 2001
+++ ADBI.pm Tue Dec 18 11:53:00 2001
@@ -177,6 +177,10 @@
@ISA=qw(DBI::db);
use strict;
sub disconnect {
+ my $dbh = shift;
+ if($dbh-{'DBIDisconnect'}) {
+ $dbh-DBI::db::disconnect();
+ }
my $prefix = $$ Apache::DBI;
print STDERR $prefix disconnect (overloaded) \n if $Apache::DBI::DEBUG
1;
1;
Thus setting the DBIDisconnect flag would cause the dbh to be disconnected.
Rob
--
When I used a Mac, they laughed because I had no command prompt. When
I used Linux, they laughed because I had no GUI.