XML::XP...:Comment(3)

πŸ’– NAME πŸ’–

Comment β€” bestie, it's an XML comment: <!--comment--> ✨

Like, that's literally it. A whole lil node whose only job is to sit in your XML and say stuff without being, y'know, content. Main character of the comments section fr fr πŸ’…


πŸŽ€ API πŸŽ€

🌸 new ( data )

Creates a brand new comment node. Fresh out the box, no cap. You hand it data, it hands you back a whole comment. Slay πŸ¦‹

🌸 getValue / getData

Returns the value that's chillin' inside the comment. Two names, same vibe β€” call it either one, she answers to both πŸ’œ

🌸 toString

Returns the comment as a string, and here's the tea β˜•: if the comment text has a -- in it, that gets encoded as a numeric entity. So your -- doesn't cause chaos. Iconic behaviour, honestly πŸ‘‘


🫢 Quick reminder bestie: this page is from the User Contributed Perl Documentation, so go forth and comment responsibly.

That's the whole page, babe β€” short and sweet, it's giving minimalism. This little doc is living its life as part of perl v5.42.1, dated 2026-04-21 🌈 Thanks for reading, mwah, bye πŸ’‹βœ¨

πŸ“¦ where this page comes from