Skip Menu |

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

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

People
Owner: simonw [...] cpan.org
Requestors: mattn.jp [...] gmail.com
Cc:
AdminCc:

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



Subject: XML::Feed-0.12 can't treat multiple subject.
When parsing AtomFeed, if the feed has several 'dc:subject' node, then Atom.pm won't return ARRAY. IMHO, 'dc:subject' is not prescribed as 'single node' in definition of Atom. (It may that I could not find it) Thus, I guess that Atom->category should use 'getlist' instead of 'get' like that RSS.pm return ARRAY when few 'dc:subject' be included. Please try attached patch.
Subject: Atom.pm.patch
--- XML/Feed/Atom.pm.orig Mon Oct 22 08:58:58 2007 +++ XML/Feed/Atom.pm Mon Oct 22 09:51:54 2007 @@ -150,7 +150,7 @@ $entry->{entry}->add_category({ term => $_[0] }); } else { my $category = $entry->{entry}->category; - $category ? ($category->label || $category->term) : $entry->{entry}->get($ns, 'subject'); + $category ? ($category->label || $category->term) : [$entry->{entry}->getlist($ns, 'subject')]; } }
Should be fixed as part of 0.23