Skip Menu |

This queue is for tickets about the XML-RSS CPAN distribution.

Report information
The Basics
Id: 47507
Status: rejected
Priority: 0/
Queue: XML-RSS

People
Owner: SHLOMIF [...] cpan.org
Requestors: e.dmitrenk [...] gmail.com
Cc:
AdminCc:

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



Subject: Bug report
Error output after running script in attachment: Use of uninitialized value in string eq at C:/Perl/site/lib/XML/RSS.pm line 936. Use of uninitialized value in string eq at C:/Perl/site/lib/XML/RSS.pm line 936. It's very strange, becouse that value is actually initialized. So please fix this bug. Thank you. Sincerely yours, Evgen Dmitrnko.
Subject: report.pl
#!/usr/bin/perl -w use strict; use Data::Dumper; use XML::RSS; use WWW::Mechanize; use XML::Simple; use LWP::UserAgent; sub rss{ my $rss_url = 'http://feeds.feedburner.com/MoonViews/'; my $rss = new XML::RSS; my $ua = new LWP::UserAgent; $ua->timeout(10); my $response = $ua->get($rss_url); print $response->content; $rss->parse($response->content); my $cache={ title=>$rss->{channel}{title}, item=>[] }; foreach my $item (@{$rss->{'items'}}[0..9]) { next unless $item; my $content=$item->{description}; $item->{pubDate}=~s/\+.*//; push @{$cache->{item}},{ title=>$item->{title}, description=>$content, time=>$item->{pubDate}, url=>$item->{link}}; } print Dumper($cache); } &rss();
On Thu Jul 02 08:07:59 2009, jerryd wrote: Show quoted text
> Error output after running script in attachment: > > Use of uninitialized value in string eq at C:/Perl/site/lib/XML/RSS.pm > line 936. > Use of uninitialized value in string eq at C:/Perl/site/lib/XML/RSS.pm > line 936. > > It's very strange, becouse that value is actually initialized. So please > fix this bug. Thank you. >
Hi! Your problem is that you are using XML::RSS to parse Atom feeds: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffeeds.feedburner.com%2FMoonViews%2F (short URL: http://xrl.us/bezgon ). XML::RSS cannot handle Atom feeds. For Atom look at XML::Atom or XML::Feed (the latter can also handle RSS). Regards, Shlomi Fish Show quoted text
> Sincerely yours, > Evgen Dmitrnko.
Чтв. Июл. 02 09:25:39 2009, SHLOMIF писал: Show quoted text
> On Thu Jul 02 08:07:59 2009, jerryd wrote:
> > Error output after running script in attachment: > > > > Use of uninitialized value in string eq at
> C:/Perl/site/lib/XML/RSS.pm
> > line 936. > > Use of uninitialized value in string eq at
> C:/Perl/site/lib/XML/RSS.pm
> > line 936. > > > > It's very strange, becouse that value is actually initialized. So
> please
> > fix this bug. Thank you. > >
> > Hi! > > Your problem is that you are using XML::RSS to parse Atom feeds: > >
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffeeds.feedburner.com%2FMoonViews%2F Show quoted text
> > (short URL: http://xrl.us/bezgon ). > > XML::RSS cannot handle Atom feeds. For Atom look at XML::Atom or > XML::Feed (the latter can also handle RSS). > > Regards, > > Shlomi Fish > >
> > Sincerely yours, > > Evgen Dmitrnko.
>
Hi, Shlomi! Thank you for your help.
Closing as rejected because we're not supposed to handle Atom feeds.