December 2010 Archives

Dancer::Plugin::Database 0.90 released

I recently extended Dancer::Plugin::Database to add a few more handy features.

Now, instead of returning a straight DBI connection handle (a DBI::db object), it returns a Dancer::Plugin::Database::Handle object, which is a subclass of DBI::db, but adding new quick_insert, quick_update and quick_delete methods, allowing you to do, for instance,:

# in your Dancer app:
database->quick_insert($tablename, \%data);

# Updating a record where id = 42:
database->quick_update($tablename, { id => 42 }, { foo => 'New value' });

So, let's say you want to handle a POST request containing a name of someone to add to your Christmas gifts list. It could be as simple as:

post '/add' => sub {
    database->quick_insert('xmas_list', { name => params->{name} });
    redirect '/';

This has been out as 0.12_01 for a few days, and the test reports look good. I've made real-world usage of it, too, and it's performed correctly.

I've also fixed test failures on Windows systems with this release.

I've bumped version from 0.12 to 0.90 as the precursor to hitting 1.0 soon. I personally don't care too much for version numbers, but I want to indicate that Dancer::Plugin::Database is considered stable and ready for production use.

Pod::Readme 0.11 released - no longer dies on =encoding

Ivan Bessarabov brought to my attention that Pod::Readme 0.10 dies when it sees an =encoding directive.

I've just released Pod::Readme 0.11 which recognises =encoding directives, and remembers the encoding specified; however, currently, it doesn't actually make use of that encoding when outputting the README file. I need to think more on what, if anything, I need to do with it.

About David Precious

user-pic Professional Perl developer, Dancer core team member, beer drinker. See for more :)