XML::F...ontent(3pm)

✨ NAME ✨

XML::Feed::Content β€” it's a wrapper for content objects, bestie πŸŽ€

So like, the manual page is XML::F...ontent(3pm) from the User Contributed Perl Documentation, and honestly? She's a tiny little module with main character energy and we're obsessed. πŸ’…


🌸 SYNOPSIS 🌸

my $content = $entry->content;
print $content->body;

That's it. That's the whole vibe. Grab the content, print the body. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

okay so picture this: XML::Feed::Content represents a content object inside an XML::Feed::Entry entry in a syndication feed. ✨

It could be a <description> element in an RSS feed, a <content> element in an Atom feed, etc. In other words β€” and this is the part that ate πŸ’… β€” it's literally any element where knowing both the actual data and the type of data is useful.


πŸ’… USAGE πŸ’…

🧚 wrap

Take params and turn them into a XML::Feed::Content object. Glow-up complete. ✨

🧚 new

A synonym for wrap. Same energy, different name, we love a flexible icon. πŸ’–

🧚 $content->body

The actual data. The moment. The content of the content. πŸ”₯

🧚 $content->type

The MIME type of the content in body.

Ngl, this is really only useful in Atom feeds, because RSS feeds do not specify the type of content included in an entry. In RSS feeds, generally the MIME type defaults to text/html. πŸ“

🧚 $content->base

The url base of the content. 🫢


Please see the XML::Feed manpage for author, copyright, and license information. πŸ’œ


and that's the whole page, bestie β€” slay, no cap 🌈

Sign-off time πŸŽ€: this is perl v5.40.1, dated 2026-02-21, and it lives in XML::F...ontent(3pm). Go forth and parse feeds, queen. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from