Subject: | $mpd->play('0') doesn't work in Audio::MPD-0.15.1 |
Date: | Mon, 19 Mar 2007 17:27:50 +0000 |
To: | bug-Audio-MPD [...] rt.cpan.org |
From: | james.noble [...] worcester.oxford.ac.uk (James Noble) |
When I issue $mpd->play('0'); the music starts playing, as if I had done
$mpd->play();
The relevant code that I think needs changing is here:
sub play {
my ($self, $number) = @_;
Show quoted text
>> $number ||= '';
$self->_send_command("play $number\n");
}
I'm pretty new to perl, but looks like it needs to check
defined($number) rather than the truth of $number
Great work on the module recently, it's become very useful. :)
-Ferret