Skip Menu |

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

Report information
The Basics
Id: 21335
Status: resolved
Priority: 0/
Queue: XML-Feed

People
Owner: simonw [...] cpan.org
Requestors: SHLOMIF [...] cpan.org
Cc:
AdminCc:

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



Subject: Incorporating Atom entries into RSS ones does not work.
As the attached script demonstrates, when splice()-ing Atom feeds into an XML::Feed::RSS, the entries don't get read, and one gets an empty feed. From an investigation it seems the add_entry() function is: <<<<<<< sub add_entry { my $feed = shift; my($entry) = @_; $feed->{rss}->add_item(%{ $entry->unwrap }); } Show quoted text
>>>>>>>>
Now in an Atom entry title() is calculated rather than being part of the hash. As a result, XML::RSS ignores these entries because they don't have a "title" property.
Subject: test1.pl
package Shlomif::Rss::Aggregate; use strict; use warnings; use XML::Feed; use LWP::UserAgent; my $feed = XML::Feed->new("RSS") or die XML::Feed->errstr; foreach my $url ("http://shlomif.livejournal.com/data/atom", ) { my $url_feed = XML::Feed->parse(URI->new($url)) or die XML::Feed->errstr; print "Collected $url\n"; $feed->splice($url_feed); } $feed->link("http://shlomif.livejournal.com/"); open my $out, ">", "test1.xml"; binmode $out, ":utf8"; print {$out} $feed->as_xml(); close($out);
Should be fixed as part of 0.23