FWIW, I'm having trouble running this program:
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use JSON::XS;
use Tvh::Htsp::Client;
my $debug_info = 1;
my $htsp = Tvh::Htsp::Client->new( { debug_info => $debug_info } );
my $msg1 = { 'method' => 'getSysTime' };
my $reply1 = $htsp->htsp_send_recv($msg1);
say JSON::XS->new->encode($reply1);
my $msg2 = { 'method' => 'hello', # 'htspversion' => 42,
'clientversion' => "v$Tvh::Htsp::Client::VERSION" };
my $reply2 = $htsp->htsp_send_recv($msg2);
say JSON::XS->new->encode($reply2);
which is adapted from the synopsis. The getSysTime() works but the hello() produces the following output:
Sending 'hello'
Sent data of length 45
3 -- 41
3 6 5 'method' 'hello'
3 13 5 'clientversion' 'v0.03'
Received data of length 32
errorInvalid arguments
1 length -- 28
$length <= length($buffer)
1 resp -- 28
4 -- 28
3 5 17 'error' 'Invalid arguments'
{"error":"Invalid arguments"}
daveh@machine:~$
... and I don't understand why, yet. 🙁 I'm not helped by some of the comments in the module being written in German. I'll look again tomorrow.
PS I don't understand why the forum isn't formatting the code block as code? But that's a different can of worms.