Skip Menu |

This queue is for tickets about the Bot-BasicBot-Pluggable CPAN distribution.

Report information
The Basics
Id: 28782
Status: resolved
Priority: 0/
Queue: Bot-BasicBot-Pluggable

People
Owner: Nobody in particular
Requestors: SMPETERS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Silence "undefined value" warning in feed processing
When playing with dipsy on #p5p, I ran into the following oddness. 08:05 <+dipsy> advice from klortho is << Error parsing RSS from http://www.dave.org.uk/klortho_rss.cgi: Can't call method "entries" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.7/Bot/BasicBot/Pluggable/Module/Infobot.pm line 431. 08:05 <+dipsy> .. >> The following patch should silence this. --- lib/Bot/BasicBot/Pluggable/Module/Infobot.pm.old Fri Aug 10 08:14:36 2007+++ lib/Bot/BasicBot/Pluggable/Module/Infobot.pm Fri Aug 10 08:15:13 2007@@ -367,7 +367,9 @@ my @items; eval { my $feed = XML::Feed->parse( URI->new( $url ) ); - @items = map { $_->title } $feed->entries; + if(defined $feed) { + @items = map { $_->title } $feed->entries; + } }; return "<< Error parsing RSS from $url: $@ >>" if $@;
Hello, Show quoted text
> When playing with dipsy on #p5p, I ran into the following oddness. > 08:05 <+dipsy> advice from klortho is << Error parsing RSS from > http://www.dave.org.uk/klortho_rss.cgi: Can't call > method > "entries" on an undefined value at >
/usr/local/lib/perl5/site_perl/5.8.7/Bot/BasicBot/Pluggable/Module/Infobot.pm Show quoted text
> line 431. > 08:05 <+dipsy> .. >> > > The following patch should silence this.
thank for the patch and the bug report. This should have been resolved in one of our last releases. Best wishes, Mario