1 # $Id: Entry.pm 942 2004-12-31 23:01:21Z btrott $
3 package XML::Feed::Entry;
9 bless { entry => $item }, $class;
27 XML::Feed::Entry - Entry/item in a syndication feed
31 ## $feed is an XML::Feed object.
32 for my $entry ($feed->entries) {
33 print $entry->title, "\n", $entry->summary, "\n\n";
38 I<XML::Feed::Entry> represents an entry/item in an I<XML::Feed> syndication
45 The title of the entry.
49 The permalink of the entry, in most cases, except in cases where it points
50 instead to an offsite URI referenced in the entry.
52 =head2 $entry->content
54 Bn I<XML::Feed::Content> object representing the full entry body, or as
55 much as is available in the feed.
57 In RSS feeds, this method will look first for
58 I<http://purl.org/rss/1.0/modules/content/#encoded> and
59 I<http://www.w3.org/1999/xhtml#body> elements, then fall back to a
60 I<E<lt>descriptionE<gt>> element.
62 =head2 $entry->summary
64 An I<XML::Feed::Content> object representing a short summary of the entry.
67 Since RSS feeds do not have the idea of a summary separate from the entry
68 body, this may not always be what you want. If the entry contains both a
69 I<E<lt>descriptionE<gt>> element B<and> another element typically used for
70 the full content of the entry--either I<http://www.w3.org/1999/xhtml/body>
71 or I<http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as
72 the summary. Otherwise, we assume that there isn't a summary, and return
73 an I<XML::Feed::Content> object with an empty string in the I<body>.
75 =head2 $entry->category
77 The category in which the entry was posted.
81 The name or email address of the person who posted the entry.
85 The unique ID of the entry.
89 A I<DateTime> object representing the date and time at which the entry
92 =head2 $entry->modified
94 A I<DateTime> object representing the last-modified date of the entry.
96 =head1 AUTHOR & COPYRIGHT
98 Please see the I<XML::Feed> manpage for author, copyright, and license