HTML::Simple is a simple, dependency free module for generating HTML (and XML).
SYNOPSIS
Note: It turns out that TOMC owns the HTML::Simple namespace so I've moved development of this module to HTML::Tiny. Please use HTML::Tiny in preference to this module.
use HTML::Simple;
my $h = HTML::Simple->new;
# Generate a simple page
print $h->html(
[
$h->head( $h->title( 'Sample page' ) ),
$h->body(
[
$h->h1( { class => 'main' }, 'Sample page' ),
$h->p( 'Hello, World', { class => 'detail' }, 'Second para' )
]
)
]
);
# Outputs
< html>
< head>
< title>Sample page< /title>
< /head>
< body>
< h1 class="main">Sample page< /h1>
< p>Hello, World< /p>
< p class="detail">Second para< /p>
< /body>
< /html>
Product's homepage
Requirements:
· Perl