1HTML::ElementRaw(3) User Contributed Perl Documentation HTML::ElementRaw(3)
2
3
4
6 HTML::ElementRaw - Perl extension for HTML::Element(3).
7
9 use HTML::ElementRaw;
10 $er = new HTML::ElementRaw;
11 $text = '<p>I would like this HTML to not be encoded</p>';
12 $er->push_content($text);
13 $h = new HTML::Element 'h2';
14 $h->push_content($er);
15 # Now $text will appear as you typed it, non-escaped,
16 # embedded in the HTML produced by $h.
17 print $h->as_HTML;
18
20 Provides a way to graft raw HTML strings into your HTML::Element(3)
21 structures. Since they represent raw text, these can only be leaves in
22 your HTML element tree. The only methods that are of any real use in
23 this degenerate element are push_content() and as_HTML(). The
24 push_content() method will simply prepend the provided text to the
25 current content. If you happen to pass an HTML::element to
26 push_content, the output of the as_HTML() method in that element will
27 be prepended.
28
30 HTML::Element(3)
31
33 Matthew P. Sisk, <sisk@mojotoad.com>
34
36 Copyright (c) 1998-2010 Matthew P. Sisk. All rights reserved. All
37 wrongs revenged. This program is free software; you can redistribute it
38 and/or modify it under the same terms as Perl itself.
39
41 HTML::Element(3), HTML::ElementSuper(3), HTML::Element::Glob(3),
42 HTML::ElementTable(3), perl(1).
43
44
45
46perl v5.32.0 2020-07-28 HTML::ElementRaw(3)