XML::Feed::Entry(3pm)
π NAME π
XML::Feed::Entry β the entry/item inside a syndication feed, bestie π
β¨ SYNOPSIS β¨
## $feed is an XML::Feed object.
for my $entry ($feed->entries) {
print $entry->title, "\n", $entry->summary, "\n\n";
}
π¦ DESCRIPTION π¦
So XML::Feed::Entry is literally the object that represents one entry/item inside an XML::Feed syndication feed π. That's it, that's the whole vibe. One little guy per post.
π USAGE π
πΈ XML::Feed::Entry->new($format)
Makes you a brand new XML::Feed::Entry object in the format $format β and $format should be either RSS or Atom, no third options babe, that's the deal π«Ά
π $entry->convert($format)
Glow-up time β¨ Takes the XML::Feed::Entry object, converts it into the $format format, and hands you back the shiny new object.
π $entry->title([ $title ])
The title of the entry, duh π
π $entry->base([ $base ])
The url base of the entry, periodt.
π₯ $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. So like, usually the permalink, but sometimes it's giving "over there instead", iykyk.
π§ $entry->content([ $content ])
An XML::Feed::Content object representing the full entry body, or as much as is available in the feed (you get what you get, no cap π
).
In RSS feeds, this method will look first for <http://purl.org/rss/1.0/modules/content/#encoded> and <http://www.w3.org/1999/xhtml#body> elements, then fall back to a <description> element. Order matters bestie β it doesn't just grab whatever it sees first π
πΈ $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 http://www.w3.org/1999/xhtml/body or <http://purl.org/rss/1.0/modules/content/#encoded> β we 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. So yeah, sometimes the summary is just... silence. π
β $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. Context girlies, you know how it is β¨
WARNING π¨ It's possible this API might change to have an add_category instead. So like, don't get too attached to the current shape of things, okay?
π¦ $entry->tags([ $tag ])
A synonym (alias) for category; same energy, different name π
π $entry->author([ $author ])
The name or email address of the person who posted the entry. Give credit where credit is due, main character energy π
π $entry->id([ $id ])
The unique ID of the entry. Its little fingerprint, fr fr.
π $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. Like, should. Don't be out here passing random strings, that's not the assignment π
π
$entry->modified([ $modified ])
A DateTime object representing the last-modified date of the entry.
If present, $modified should be a DateTime object. Same rule, bestie π«Ά
π₯ $entry->wrap
Take an entry in its native format and turn it into an XML::Feed::Entry object. Cinderella arc, but for data π§
β¨ $entry->unwrap
Take an XML::Feed::Entry object and turn it into its native format. Reverse Cinderella π
π AUTHOR & COPYRIGHT π
Please see the XML::Feed manpage for author, copyright, and license information. Go check it, they deserve the credit π
sign-off time πβ¨ this was perl v5.40.1, dated 2026-02-21, and you just read XML::Feed::Entry(3pm). slay, go build something cute with it ππ¦π
π¦ where this page comes from
- ubuntu stonking: libxml-feed-perl 1.0.0+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms