perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <modperl-l...@2xlp.com>
Subject Re: Apache::DBI - alias disconnect before overload?
Date Thu, 25 May 2006 23:53:14 GMT

perhaps its a bug.  i don't know.

basically, i have this:

BEGIN
{
	use MyApp::DB::Config;
	my 	$DB_config = MyApp::DB::Config->new();
		$DB_config->dbconnect(); # connects and stores a dbh in a wrapper  
class  $DB_config->{'DBH'}
=snip
	pull some startup config vars
=cut
	$DB_config->dbdisconnect();
	$DB_config = undef;
}

dbdisconnect does this in the wrapper class:
		$_[0]->{'DBH'}->disconnect();
		$_[0]->{'DBH'} = undef;

that never disconnects from the db ( i even tossed in undef'ing the  
objects so they'd get __DESTROY__'ed, but no luck.

i tried doing

	$_[0]->{'DBH'}->DBI::db::disconnect();

that worked perfect.


| - - - - - - - - - - - - - - - - - - - -
| RoadSound.com / Indie-Rock.net
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - -





Mime
View raw message