-
-
02 Jan 2012 18:48:48 UTC
- Distribution: Dancer-Plugin-MPD
- Module version: 0.03
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (530 / 1 / 0)
- Kwalitee
Bus factor: 1- 87.50% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (3.66KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Audio::MPD
- Dancer
- Test::More
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- DESCRIPTION
- SYNOPSIS
- CONFIGURATION
- HOOKS
- AUTHOR
- ACKNOWLEDGEMENTS
- BUGS
- SUPPORT
- LICENSE AND COPYRIGHT
NAME
Dancer::Plugin::MPD - easy connection to MPD from Dancer apps
DESCRIPTION
Provides an easy way to connect to MPD (www.musicpd.org) from a Dancer app. Handles obtaining the connection, making sure the connection is still alive, and reconnecting if not.
SYNOPSIS
In your Dancer app, calling the
mpd
keyword will get you an MPD connection.use Dancer::Plugin::MPD; my $current_song = mpd->current; mpd->next;
CONFIGURATION
Audio::MPD does sensible things by default, so in the majority of cases (MPD running on the same host as the app, no password needed, and happy to reuse the connection for performance), no configuration will be required at all.
However, the following config settings can be used in your app's
config.yml
:plugins: MPD: host: localhost port: 6600 password: verysecret conntype: reuse
HOOKS
mpd_connected
Called when a connection is established, and receives the Audio::MPD object as its parameter.
hook 'mpd_connected' => sub { my $mpd = shift; $mpd->repeat(1); $mpd->random(1); $mpd->play; };
AUTHOR
David Precious,
<davidp at preshweb.co.uk>
ACKNOWLEDGEMENTS
Alan Berndt
BUGS
Please report any bugs or feature requests to
bug-dancer-plugin-mpd at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer-Plugin-MPD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Dancer::Plugin::MPD
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2010-12 David Precious.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install Dancer::Plugin::MPD, copy and paste the appropriate command in to your terminal.
cpanm Dancer::Plugin::MPD
perl -MCPAN -e shell install Dancer::Plugin::MPD
For more information on module installation, please visit the detailed CPAN module installation guide.