chuntuk has asked for the wisdom of the Perl Monks concerning the following question:

I have some established perl code that uses WebService::YQL to access web services, it's been working fine for years. But for the last few days any script using that module has crashed out with this error:
Couldn't find a decoder method. at /home/redacted/perl/usr/share/perl5/WebService/YQL.pm line 9.
BEGIN failed--compilation aborted at /home/redacted/perl/usr/share/perl5/WebService/YQL.pm line 9.
I get the error even with a test script like this:
use CGI::Carp qw(fatalsToBrowser);

use WebService::YQL;

print "Content-type: text/plain\n\n";

print "Hello World\n";
Line 9 of YQL.pm is "use JSON::Any;", which is deprecated, but I don't see what I can do about that. Could anyone help me figure out what the problem is and how to fix it? Thanks.
  • Comment on WebService::YQL "Couldn't find a decoder method"

Replies are listed 'Best First'.
Re: WebService::YQL "Couldn't find a decoder method"
by ikegami (Patriarch) on Aug 11, 2018 at 13:19 UTC
      Thanks, but I have both JSON::XS and JSON::PP installed (I can't install Cpanel::JSON:XS as it requires a C compiler, which I don't have at my host). I've used CPAN to ensure I have the latest versions of the modules concerned. I still get the error.

        What version of JSON::Any do you have ? See this 2013 bug report https://rt.cpan.org/Public/Bug/Display.html?id=89853

        The newly released version 3.0/3.01 of JSON::XS is not compatible with JSON::Any 1.30. After upgrading JSON::XS, trying to import JSON::Any results in: Couldn't find a decoder method.

        poj