Bugzilla – Bug 17984
Certain buttons don't work with Perl 5.16
Last modified: 2012-07-05 00:35:14 UTC
After upgrading Perl to 5.16 on Arch Linux, certain buttons in various interfaces stopped working. For instance: * Next/Previous/Pause from the web interface * Next/Previous from the IR remote control * Next/Previous from the Touch's screen Most buttons work, and if I send for instance "$PLAYERID button jump_fwd" to the CLI via Telnet, it works, but the same command via the web using JSON ({"id":1, "method":"slim.request","params":["$PLAYERID",["button","jump_fwd"]]}) does NOT work. I found that the buttons that were broken were sending empty strings in places where the working ones were sending undefs: BROKEN: [12-06-05 21:15:46.9474] Slim::Control::Request::dump (2374) Request: Command [$PLAYERID->button] from /024d0a29/slim/request|138||024d0a29 (Dispatchable) [12-06-05 21:15:46.9493] Slim::Control::Request::dump (2376) Param: [_orFunction] = [] [12-06-05 21:15:46.9511] Slim::Control::Request::dump (2376) Param: [_buttoncode] = [jump_fwd] [12-06-05 21:15:46.9529] Slim::Control::Request::dump (2376) Param: [_time] = [] WORKING: [12-06-05 21:16:21.4634] Slim::Control::Request::dump (2374) Request: Command [$PLAYERID->button] from CLI (Dispatchable) [12-06-05 21:16:21.4652] Slim::Control::Request::dump (2376) Param: [_buttoncode] = [jump_fwd] [12-06-05 21:16:21.4670] Slim::Control::Request::dump (2376) Param: [_time] = undef [12-06-05 21:16:21.4689] Slim::Control::Request::dump (2376) Param: [_orFunction] = undef So what I did was change the return line in getParam in Slim/Control/Request.pm from * return $_[0]->{'_params'}->{ $_[1] }; to * return ($_[0]->{'_params'}->{ $_[1] } ne '') ? $_[0]->{'_params'}->{ $_[1] } : undef; and now everything seems to work perfectly, but I'm sure I'm treating a symptom rather than the disease. Also I don't see anything in the perldelta that would explain this coming up now and not earlier, but I don't really know Perl. The only other people I've seen with this problem are Arch users, but that might just be because Arch adopted Perl 5.16 earlier than others. There's a thread about the problem here: http://forums.slimdevices.com/showthread.php?95408-perl-7-16 and the Arch package page is here: https://aur.archlinux.org/packages.php?ID=53691 Like I said, I've managed a fix, but this might pop up in other distros in the future (unless its an Arch quirk causing the problem), so I hope this is helpful. Sorry if the formatting is all wonky; this is my first bug report.
*** This bug has been confirmed by popular vote. ***
Please fix the media server to make it work with 5.16.
*** This bug has been marked as a duplicate of bug 17985 ***