[Dancer-users] New hooks and extensibility in Dancer::Plugin::Database
davidp at preshweb.co.uk
Sat Feb 4 12:43:22 CET 2012
A developer version of Dancer::Plugin::Database went to CPAN last night
(1.70_01) with a few new features requested by Nick S. Knutov:
- database_connect_failed - fired when an attempt to connect to the
- database_connection_lost - fired when we realise that a database
handle is no longer usable (the connection went away)
- database_error - fired when any database error is raised by DBI
(implemented using DBI's HandleError, so it will catch all SQL
errors etc regardless of whether you were using D::P::D's
convenience methods or running your own queries direct).
- New "handle_class" configuration option allows you to set which
class the handle will be blessed into, so you can subclass
Dancer::Plugin::Database::Handle and have handles blessed into your
subclass instead, so you can add your own custom features etc.
Please feel free to test the developer release if you have time,
feedback would be welcomed. Once I see decent CPAN testers results
come back, I'll get a new stable version out in the next few days.
David Precious ("bigpresh") <davidp at preshweb.co.uk>
More information about the Dancer-users