1XML::Feed::Entry(3)   User Contributed Perl Documentation  XML::Feed::Entry(3)
2
3
4

NAME

6       XML::Feed::Entry - Entry/item in a syndication feed
7

SYNOPSIS

9           ## $feed is an XML::Feed object.
10           for my $entry ($feed->entries) {
11               print $entry->title, "\n", $entry->summary, "\n\n";
12           }
13

DESCRIPTION

15       XML::Feed::Entry represents an entry/item in an XML::Feed syndication
16       feed.
17

USAGE

19   XML::Feed::Entry->new($format)
20       Creates a new XML::Feed::Entry object in the format $format, which
21       should be either RSS or Atom.
22
23   $entry->convert($format)
24       Converts the XML::Feed::Entry object into the $format format, and
25       returns the new object.
26
27   $entry->title([ $title ])
28       The title of the entry.
29
30   $entry->base([ $base ])
31       The url base of the entry.
32
33   $entry->link([ $uri ])
34       The permalink of the entry, in most cases, except in cases where it
35       points instead to an offsite URI referenced in the entry.
36
37   $entry->content([ $content ])
38       An XML::Feed::Content object representing the full entry body, or as
39       much as is available in the feed.
40
41       In RSS feeds, this method will look first for
42       <http://purl.org/rss/1.0/modules/content/#encoded> and
43       <http://www.w3.org/1999/xhtml#body> elements, then fall back to a
44       <description> element.
45
46   $entry->summary([ $summary ])
47       An XML::Feed::Content object representing a short summary of the entry.
48       Possibly.
49
50       Since RSS feeds do not have the idea of a summary separate from the
51       entry body, this may not always be what you want. If the entry contains
52       both a <description> element and another element typically used for the
53       full content of the entry--either http://www.w3.org/1999/xhtml/body or
54       <http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as
55       the summary. Otherwise, we assume that there isn't a summary, and
56       return an XML::Feed::Content object with an empty string in the body.
57
58   $entry->category([ $category ])
59       The category in which the entry was posted.
60
61       Returns a list of categories if called in array context or the first
62       category if called in scalar context.
63
64       WARNING It's possible this API might change to have an add_category
65       instead.
66
67   $entry->tags([ $tag ])
68       A synonym (alias) for category;
69
70   $entry->author([ $author ])
71       The name or email address of the person who posted the entry.
72
73   $entry->id([ $id ])
74       The unique ID of the entry.
75
76   $entry->issued([ $issued ])
77       A DateTime object representing the date and time at which the entry was
78       posted.
79
80       If present, $issued should be a DateTime object.
81
82   $entry->modified([ $modified ])
83       A DateTime object representing the last-modified date of the entry.
84
85       If present, $modified should be a DateTime object.
86
87   $entry->wrap
88       Take an entry in its native format and turn it into an XML::Feed::Entry
89       object.
90
91   $entry->unwrap
92       Take an XML::Feed::Entry object and turn it into its native format.
93
95       Please see the XML::Feed manpage for author, copyright, and license
96       information.
97
98
99
100perl v5.28.1                      2019-02-06               XML::Feed::Entry(3)
Impressum