CC: | Jens Wolter <Jens.Wolter [...] partner.bmw.de> |
Subject: | Bug in PJLink.pm |
Date: | Sun, 26 Sep 2010 21:39:27 +0200 |
To: | bug-Net-PJLink [...] rt.cpan.org |
From: | Jens Wolter <jens.wolter [...] philosys.de> |
Distribution, Version: Net-PJLink-1.00
Perl Version: This is perl, v5.10.0 built for x86_64-linux-thread-multi
OS: Linux xxxx 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100\
x86_64 x86_64 x86_64 GNU/Linux
Testing the functionality of Net-PJLink it seems all get-functions are working
fine. But testing set_power(0) and set_power(1) both are switching on the projector.
Analyzing the network by wireshark, both functions are sending "%1POWR 1".
Analyzing the syntax in /usr/lib/perl5/site_perl/5.10.0/Net/PJLink.pm shows
that the syntax may be wrong:
my $status = (@_ ? '1' : '0');
It should be
my $status = ($_[0] ? '1' : '0');
See also set_audio_mute().