On Sep 26, 2007, at 5:28 PM, Jonathan Swartz wrote: > I find Rose::DB's reference counting of DBI handles confusing, and > would like to effectively neutralize it for my entire project. For > example I want > > $dbh = Rose::DB->new()->dbh > > to work even though it is incorrect (because it is such a common > mistake to make). I'm happy to let DBI just disconnect the handle > when it goes out of scope. > > The way I was going to do this was to override init_dbh to always > call retain_dbh: > > sub init_dbh > { > my $self = shift; > $self->SUPER::init_dbh; > $self->retain_dbh; > } > > Is that correct? Is there an easier way?
I sub-class Rose::DB and define an empty DESTROY method Graham. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object