On Tue Jul 19 10:58:08 2011, fred@redhotpenguin.com wrote:
Show quoted text> On Thu, Jul 14, 2011 at 3:27 PM, MSTROUT via RT
> <bug-DBIx-Class@rt.cpan.org> wrote:
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=69107 >
> > "Since DBIx::Class does its own connection management and has well known
> > semantics as to $dbh lifetime, allowing Apache::DBI to affect the
> > connect process at all would be a bug."
>
> Can you point me in the direction of where these connection management
> specifics and dbh lifetime details are documented, or are in the
> codebase? I'd really like to be familiar with these so that I can
> understand this issue as well as the DBIx::Class developers and make
> any needed changes to Apache::DBI so everyone is satisfied.
DBIx::Class provides a single persistent $dbh per $schema.
It is not touched by anybody else.
Apache::DBI breaks this.
Show quoted text> That's what I'm after here, a way to make Apache::DBI and DBIx::Class
> work well together without needed the mentioned action-at-a-distance
> approach of having alternative semantics forced upon the user by
> DBIx::Class.
What are you talking about?
The specific problem here is Apache::DBI's entire purpose is action at a
distance.
We are not doing action-at-a-distance. We are undoing yours.
All I want is a documented API for saying "Apache::DBI, please
un-monkeypatch my DBI for this scope because I don't want you to inflict
action-at-a-distance on DBIx::Class"
That's it.
Or we can fix our current "disable the stupid thing with extreme
prejudice" code.
Either way works for me.
There is no such thing as "work well together". Apache::DBI's entire
purpose is to solve a problem that DBIx::Class used correctly does not
have. Apache::DBI's entire purpose is to patch around badly written DBI
code and make it use a persistent $dbh in spite of the original author's
incompetence.
That's a really nice thing to have available. But it's no use whatsoever
to our users, so I don't want to inflict it on them.
Please give us a way to turn Apache::DBI *off*, and I'll happily take a
patch that lets you say "please let Apache::DBI do its
action-at-a-distance thing" explicitly to DBIx::Class so that it's clear
that you're asking for weird global effects.
There is no bug in Apache::DBI to be fixed here. It simply does
something that we DO NOT WANT because we ALREADY CACHE THE DATABASE HANDLE.
If a DBIx::Class user is creating their $schema again and again, that's
a bug to be fixed. Loading Apache::DBI is just papering over that bug.
I refuse to penalize everybody using DBIx::Class correctly just because
Apache::DBI has been loaded because somebody used DBI a stupid way
somewhere else in the same perl5 VM.
So.
I will take a patch to make our turning Apache::DBI *off* more elegant.
I will take a patch to optionally let the user say they want the
Apache::DBI monkeypatch - something like
'allow_apache_dbi_connect_override' as a storage option.
But you're the one forcing semantics on the user, not us.
So I'm going to mark this bug as rejected now. If you want to engage in
further discussion that isn't the submission of the above suggested
patches, please come and talk to me on IRC, because I'm repeating myself
over and over here and I'm sick of it now.
REJECTED: THE ONLY BUG HERE IS APACHE::DBI.