Dancer::Plugin::MPD released

I recently wrote Dancer::Plugin::MPD, a simple plugin to make it easy to talk to MPD (Music Player Daemon) from Dancer-powered webapps in Perl.

It uses Jerome Quelin’s excellent Audio::MPD – it simply provides an mpd keyword which returns a connected Audio::MPD object (connecting first, if we didn’t have a connection or it went away, otherwise keeping the connected object cached).

It makes for code as simple as this example from DancerJukebox:

get '/control/skip' => sub { mpd->next; redirect '/'; };