Closed mlawren closed 13 years ago
You want the connected
Callback!
Ah indeed. DBI has support for this built-in... learning new things every day :-)
Thanks.
Yes, well, in fairness, the feature has been there for about five years, but was only documented a few months ago…
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?
@ocharles Great idea. Got a doc patch?
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.