HTML-Tiny
view release on metacpan or search on metacpan
lib/HTML/Tiny.pm view on Meta::CPAN
<h1 class="main">Sample page</h1>
<p>Hello, World</p>
<p class="detail">Second para</p>
</body>
</html>
=head1 DESCRIPTION
C<< HTML::Tiny >> is a simple, dependency free module for generating
HTML (and XML). It concentrates on generating syntactically correct
XHTML using a simple Perl notation.
In addition to the HTML generation functions utility functions are
provided to
=over
=item * encode and decode URL encoded strings
=item * entity encode HTML
lib/HTML/Tiny.pm view on Meta::CPAN
blink blockquote body br button canvas caption center cite code col colgroup
data datalist dd del details dfn dialog dir div dl dt em embed fieldset
figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head
header hgroup hr html i iframe img input ins kbd keygen label legend li link
main map mark marquee menu menuitem meta meter nav nobr noframes noscript
object ol optgroup option output p param picture portal pre progress q rb rp
rt rtc ruby s samp script section select slot small source spacer span strike
strong style sub summary sup table tbody td template textarea tfoot th thead
time title tr track tt u ul var video wbr xmp
The following methods generate closed XHTML (<br />) tags by default:
area base br col embed frame hr iframe img input keygen link meta param
source track wbr
So:
print $h->br; # prints <br />
print $h->input({ name => 'field1' });
# prints <input name="field1" />
print $h->img({ src => 'pic.jpg' });
( run in 1.225 second using v1.01-cache-2.11-cpan-49f99fa48dc )