in reply to Re: WWW::Pusher - does not send a message
in thread WWW::Pusher - does not send a message

Thanks for help. No I understand what was the problem. Data was not correctly formatted in JSON. I corrected Pusher.pm module. It is not the most elegant way, but it works for me So far I checked simple data transfer, compex data - will do later.

Corrected script: https://github.com/rkrasowski/pusher/

Thanks like always for help Robert

  • Comment on Re^2: WWW::Pusher - does not send a message

Replies are listed 'Best First'.
Re^3: WWW::Pusher - does not send a message
by choroba (Cardinal) on Jun 14, 2015 at 19:48 UTC
    The source code of WWW::Pusher is on GitHub. You should have forked the repository and created a pull request to fix the problem.

    But I'm not sure you really fixed any issues. You replaced

    my $payload = to_json($args{data}, { allow_nonref => 1 });

    with

    my $message = "$args{data}"; my %rec_hash = ('message' => $message); my $payload = to_json (\%rec_hash, { allow_nonref => 1 });

    (with broken indentation). Which means, your version of the module can only send "message", while the original allows for any data to be sent (not knowing the module's purpose, I'm not sure it's desirable, though). The solution I provided does exactly the same.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      That is exactly the problem, I fixed enough to do what I want but problem is still there, therefore ,until I will fix it all it will be only in my git. Thanks for your help. Your suggestion helped. Robert