Re: Oracle cursors and purge
[prev]
[thread]
[next]
[Date index for 2004/11/09]
On Tue, 2004-11-09 at 10:55, Jim Brandt wrote:
> So another piece to the puzzle is that when running CDBI 0.96 without
> Ima::DBI version 0.31, the problem goes away.
I don't think you can run Class::DBI without any use of Ima::DBI, can
you?
> # Keep track of current handle to avoid opening a new
> # one for each connect.
> if ( defined $pid ){
> return $dbh if $pid == $$;
> }
That's not so great. You would be much better off using
DBI->connect_cached() instead.
> $dbh = DBI->connect(connect_string,
> username,
> password,
> {PrintError => 1,
> RaiseError => 1,
> AutoCommit => 1,
> ShowErrorStatement => 1,
> RootClass => 'Ima::DBI',
> })
In Class::DBI 0.96 these parameter defaults are different. This is what
I use:
RaiseError => 1,
AutoCommit => 1,
FetchHashKeyName => 'NAME_lc',
ShowErrorStatement => 1,
ChopBlanks => 1,
RootClass => 'DBIx::ContextualFetch'
> I'm leaning toward 'finish' not being called somewhere or some sort of
> scoping issue where CDBI objects are staying in scope too long. Is this
> possible, or just crazy talk?
Very possible, although you shouldn't need to call finish().
- Perrin