Hi,

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'm curious to know what the motivation was for Rose::DB to handle  
ref counting in the first place. Is/was this DBI disconnect-on- 
destroy behavior not always reliable?

Jon


-------------------------------------------------------------------------
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

Reply via email to