Matt S Trout > XML-Feed-0.44 > XML::Feed::Entry



Annotate this POD (1)


New  4
Open  5
View/Report Bugs
Source   Latest Release: XML-Feed-0.52


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


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


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



Creates a new XML::Feed::Entry object in the format $format, which should be either RSS or Atom.


Converts the XML::Feed::Entry object into the $format format, and returns the new object.

$entry->title([ $title ])

The title of the entry.

$entry->base([ $base ])

The url base of the entry.

$entry->link([ $uri ])

The permalink of the entry, in most cases, except in cases where it points instead to an offsite URI referenced in the entry.

$entry->content([ $content ])

Bn XML::Feed::Content object representing the full entry body, or as much as is available in the feed.

In RSS feeds, this method will look first for and elements, then fall back to a <description> element.

$entry->summary([ $summary ])

An XML::Feed::Content object representing a short summary of the entry. Possibly.

Since RSS feeds do not have the idea of a summary separate from the entry body, this may not always be what you want. If the entry contains both a <description> element and another element typically used for the full content of the entry--either or treat that as the summary. Otherwise, we assume that there isn't a summary, and return an XML::Feed::Content object with an empty string in the body.

$entry->category([ $category ])

The category in which the entry was posted.

Returns a list of categories if called in array context or the first category if called in scalar context.

WARNING It's possible this API might change to have an add_category instead.

$entry->tags([ $tag ])

A synonym for category;

$entry->author([ $author ])

The name or email address of the person who posted the entry.

$entry->id([ $id ])

The unique ID of the entry.

$entry->issued([ $issued ])

A DateTime object representing the date and time at which the entry was posted.

If present, $issued should be a DateTime object.

$entry->modified([ $modified ])

A DateTime object representing the last-modified date of the entry.

If present, $modified should be a DateTime object.


Take an entry in its native format and turn it into an XML::Feed::Entry object.


Take an XML::Feed::Entry object and turn it into its native format.


Please see the XML::Feed manpage for author, copyright, and license information.

syntax highlighting: