SnowWolf75 has asked for the wisdom of the Perl Monks concerning the following question:
produces:use HTML::Tiny; my $h = HTML::Tiny->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' ) ] ) ] );
instead of the neatly formatted example they show. Did I miss a flag somewhere in the creation/use of it?<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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Properly indented using HTML::Tiny
by planetscape (Chancellor) on Oct 20, 2009 at 04:24 UTC | |
by SnowWolf75 (Initiate) on Oct 21, 2009 at 22:41 UTC | |
|
Re: Properly indented using HTML::Tiny
by gmargo (Hermit) on Oct 20, 2009 at 00:22 UTC | |
|
Re: Properly indented using HTML::Tiny
by ikegami (Patriarch) on Oct 19, 2009 at 22:59 UTC | |
|
Re: Properly indented using HTML::Tiny
by herveus (Prior) on Oct 20, 2009 at 11:59 UTC | |
by SnowWolf75 (Initiate) on Oct 21, 2009 at 22:52 UTC | |
|
Re: Properly indented using HTML::Tiny
by eye (Chaplain) on Oct 20, 2009 at 07:54 UTC |