Feature Request: callback on each internal "connect()" call. #8

Closed
mlawren opened this Issue Jan 5, 2011 · 5 comments

Comments

Projects
None yet
3 participants
Contributor

mlawren commented Jan 5, 2011

At the moment I don't see a way to cause an action to occur after DBIx::Connector (re-)connects with DBI. This is needed for example if one wants to turn on foreign key support in SQLite or set client_min_messages in Pg. Have I missed something?

My API suggestion would be to accept a coderef as the fifth argument to the connect() method.

Owner

theory commented Jan 5, 2011

You want the connected Callback!

Contributor

mlawren commented Jan 6, 2011

Ah indeed. DBI has support for this built-in... learning new things every day :-)

Thanks.

Owner

theory commented Jan 6, 2011

Yes, well, in fairness, the feature has been there for about five years, but was only documented a few months ago…

ocharles commented Jan 3, 2012

I just came to request this exact same issue, and couldn't find it in DBIx::Connector docs. While I understand it's not supported by DBIx::Connector itself, that's where I first ended up looking. What do you think about adding a little note about on connection callbacks being handled by DBI?

Owner

theory commented Jan 3, 2012

@ocharles Great idea. Got a doc patch?

@rwstauner rwstauner added a commit to rwstauner/dbix-connector that referenced this issue May 16, 2012

@rwstauner rwstauner Mention the 'connected' DBI Callback from constructor Pod
to avoid having more issues like gh-8 and gh-19 opened.
3e8b520

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment