Data::Mapper Updated to 0.04
Data::Mapper has been updated to version 0.04. I'm trying to use it in my new project and improving it along with the real development progress.
Adapter object now takes a coderef as a driver factory. It's especially for the use with DBIx::Handler:
my $handler = DBIx::Handler->new(...); my $adapter = Data::Mapper::Adapter::DBI->new({ driver => sub { $handler->dbh } });
One of DBIx::Handler's useful features is to keep DB connection active. This change was added for that by supporting a coderef for the driver parameter of the Adapter class.
By the way, I have some intention to use Data::Mapper not only for kind of ORM-ish way, but also a wrapper around data from anywhere, for instance, external Web API. I'm also trying to deal with API's with the module. When it becomes stable, I'll introduce it here.