You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd really like to Dancer::Plugin::Database to call DBIx::Log4perl->connect instead of DBI->connect. DBIx::Log4perl subclasses DBI so it should be fairly straight forward if D::P::D had a config option for it.
The text was updated successfully, but these errors were encountered:
This seemed dead easy to start with - a new optional param, dbi_class or something, and have the connection code use $class->connect instead of DBI->connect.
However, where it gets interesting is that the DB handle is then re-blessed into Dancer::Plugin::Database::Handle which subclasses DBI::db. For this to work, the code would presumably need to call $class->connect, then see what kind of object it got back (DBI::db, DBIx::Log4perl::db, ...) then arrange for the D::P::D::Handle to subclass that type of object at runtime. That could make things more complex.
I shall have a further think on this as soon as I have a moment - suggestions welcome of course :)
I'd really like to Dancer::Plugin::Database to call DBIx::Log4perl->connect instead of DBI->connect. DBIx::Log4perl subclasses DBI so it should be fairly straight forward if D::P::D had a config option for it.
The text was updated successfully, but these errors were encountered: