HTML::ElementRaw(3pm)

HTML::ElementRaw3pm

Perl extension for html::element(3).

Usage

  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;

Overview

Provides a way to graft raw HTML strings into your HTML::Element(3) structures. Since they represent raw text, these can only be leaves in your HTML element tree. The only methods that are of any real use in this degenerate element are push_content() and as_HTML(). The push_content() method will simply prepend the provided text to the current content. If you happen to pass an HTML::element to push_content, the output of the as_HTML() method in that element will be prepended.

Requires

HTML::Element(3)

Releases

12 releases since Debian 3.1 (Sarge); the text changed 7 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0
  4. 7–10
  5. 11
  6. 12
  7. 13
  8. Arch

Author

Matthew P. Sisk, <[email protected]>

From perl-html-element-extended 1.18-15 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.