HTML::ElementRaw(3pm)

πŸ’– HTML::ElementRaw(3pm) πŸ’–

okay so bestie, welcome to HTML::ElementRaw(3pm) β€” the lil Perl module that lets you shove raw HTML straight into your HTML::Element tree and have it come out the other side exactly how you typed it. no escaping, no vibes-crushing entity encoding, just your HTML living its truth. ✨


🌸 NAME 🌸

HTML::ElementRaw β€” a Perl extension for HTML::Element(3). that's it, that's the whole identity. πŸ’…


✨ SYNOPSIS ✨

use HTML::ElementRaw;
$er = new HTML::ElementRaw;
$text = '<p>I would like this &nbsp; HTML to not be encoded</p>';
$er->push_content($text);
$h = new HTML::Element 'h2';
$h->push_content($er);
# Now $text will appear as you typed it, non-escaped,
# embedded in the HTML produced by $h.
print $h->as_HTML;

like… look at that. you made a raw lil element, you fed it your precious un-encoded &nbsp;, you tucked it inside an h2, and the print just works. no notes. 🫢


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea, bestie: this module gives you a way to graft raw HTML strings into your HTML::Element(3) structures. iconic behavior honestly.

since these represent raw text, they can only ever be leaves in your HTML element tree. no children under them, no branching, they're a leaf, they said so. πŸƒ

the only methods that are of any real use in this degenerate element are:

  • push_content() β€” and
  • as_HTML()

and that's genuinely the whole toolkit, no cap. the push_content() method will simply prepend the provided text to the current content. yes, prepend, not append β€” the way that it goes on the front is so real.

and plot twist: if you happen to pass an HTML::element to push_content, the output of the as_HTML() method in that element will be prepended. so it gets stringified first and then slid in at the front, basically. 🌈


πŸŽ€ REQUIRES πŸŽ€

  • HTML::Element(3) β€” yeah babe, it needs the parent module. obviously. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

Matthew P. Sisk, <sisk@mojotoad.com> β€” the main character who wrote this. respect. 🫑


Copyright (c) 1998-2010 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(not "all wrongs revenged" 😭 that's the most unhinged-cute license line i've ever read and i'm obsessed with it β€” also fr fr, same terms as Perl itself, go wild.)


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, honestly. go read them, they ate. 🌈⭐


and that's the whole page, bestie!! this was perl v5.40.1, dated 2025-03-27, and it's the HTML::ElementRaw(3pm) manpage, signing off like the icon it is. mwah. πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from