[Dbix-class] db handle disconnect?

Brandon Black blblack at gmail.com
Wed Aug 9 17:56:39 CEST 2006


On 8/9/06, Tim Keefer <tkeefer at gmail.com> wrote:
>
> Anyone have some insight as to why I'm unable to successfully cache the
> dbh?
>
> When calling the connect method I pass it a code reference like so:
>
> my $dbh = get_dbh();
> if ( ! $dbh ) {
>    $dbh = DBI->connect_cached ....
>     store_dbh( $dbh );
> }
> return $dbh;
>
> This used to work with the older version of DBIx::Class.
>
> Thanks,
> Tim
>


I'm not sure why you're usage broke.  Could you be more explicit?  What
version did it work in?  What version broke you?  What's the exact subref
you're passing to connect, and what else does it interact with (what does
the code for get_dbh and store_dbh do, exactly)?

Aside from all of that, what are you really trying to accomplish?  The
coderef form of input to connect_info was designed for certain very unusual
usages that can't be handled any other (saner) way.

-- Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20060809/41020668/attachment.htm 


More information about the Dbix-class mailing list