Subject: | $feed->entries[n]->link() method doesn't retrieve links from atom feeds following latest spec |
XML::Atom .041 doesn't parse links from the newest spec. For instance:
#!/usr/bin/perl
use strict;
use XML::Atom::API;
use XML::Atom::Feed::JavaScript;
my $entry;
my $api=XML::Atom::API->new();
# the rW Atom feed is using the .03 Atom Feed from Mark Pilgrim's site with links like:
# <link rel="alternate" type="text/html" href="http://randomwalks.com/archive/2003/12/liberty_equality_fraternity.php"/>
# This prints only titles
my $feed=$api->getFeed('http://www.randomwalks.com/index.atom');
foreach $entry ($feed->entries) {
print $entry->link(), "\n";
print $entry->title(), "\n";
}
# the sample feed from hello, typepad follows the (depricated?) typepad feed format
# <link xmlns="http://purl.org/atom/ns#">http://hello.typepad.com/hello/2003/12/kucinich_feeds.html</link>
# the t/atom.xml feed is included in the Feed::Javascript distribution
# this prints both titles and links
my $feed=XML::Atom::Feed->new( Stream => '../atom-javascript/t/atom.xml');
foreach $entry ($feed->entries) {
print $entry->link(), "\n";
print $entry->title(), "\n";
}
__END__
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)
Darwin PONY.local 7.2.0 Darwin Kernel Version 7.2.0: Thu Dec 11 16:20:23 PST 2003; root:xnu/xnu-517.3.7.obj~1/RELEASE_PPC Power Macintosh powerpc