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')];
}
}