Subject: | Bug (?) |
Date: | Sat, 20 Jun 2009 19:19:41 +0200 |
To: | bug-WWW-Yahoo-InboundLinks [...] rt.cpan.org |
From: | marc-olivier bernard <mob [...] teradoc.com> |
Hello,
When retrieving backlinks from yahoo on domain wumiyo.com, the JSON
response seems to be ill, an exception is raised but my script will
exit without being able to catch it.
My script:
my %param = (omit_inlinks=>'domain',entire_site=>1,results=>100,start=>1);
my $target = "http://www.wumiyo.com";
eval{
($count, $resp, $struct) = $ylinks->get ($target,%param);
};
if($@){
print "--> CAUGHT EXCEPTION:",$@,"\n";
return undef;
}
To solve this issue, I successfully added an eval within
WWW/Yahoo/InboundLinks.pm at line 79
+ my $parser = "$self->{format}_parser";
+ eval{
$self->$parser ($resp, \@result);
+ };
+ if($@){
+ return $@;
+ }
Regards,
* Package Version 0.07
* This is perl, v5.8.5 built for i386-linux-thread-multi
* Linux teradoc 2.6.12-1.1381_FC3 #1 Fri Oct 21 03:46:55 EDT 2005 i686
i686 i386 GNU/Linux
--
Marc-Olivier BERNARD
Office:
landline : +33 (0)1 45 35 22 98
mobile: +33 (0)6 20 10 00 56