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
Download (untitled) / with headers
text/plain 344b
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
Download report.pl
text/x-perl 782b
#!/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();
Download (untitled) / with headers
text/plain 756b
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.
Download (untitled) / with headers
text/plain 913b
Чтв. Июл. 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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.