Daniel T. Staal > HTML-Stream-1.60 > html2perlstream

Download:
HTML-Stream-1.60.tar.gz

Annotate this POD

CPAN RT

Open  1
Stalled  1
View/Report Bugs
Source  

NAME ^

html2perlstream - convert an HTML document to Perl code for that document

SYNOPSIS ^

    html2perlstream
    html2perlstream [options] -
    html2perlstream [options] file.html .. file.html

DESCRIPTION ^

Takes an HTML file, and produces from it a Perl script that will generate that HTML using the HTML::Stream module.

For usage, just say:

    html2perlstream

The normal form is:

    html2perlstream [-options] [files]

Any named HTML input file file.html will cause output script file.html.pl to be generated. To read from the standard input, specify '-', like this:

    html2perlstream - < test.html

If reading from the standard input, the output Perl code goes to the standard output. So if you want to run it right away to see the output, just do this:

    html2perlstream - < test.html | perl

OPTIONS ^

-d

Automatically load and run the output Perl file, then do a diff on that and the input file (you must input from a file and output to a file in order to use this).

    html2perlstream -w -d testin/test.html

You'll get fewer differences if you build the code with -w.

-w

Try to generate code which will output all whitespace between tags verbatim. The default code only outputs whitespace if it is believed to be needed; e.g., if we are inside a PRE environment.

REQUIRES ^

To run this, you need:

   HTML::Entities
   HTML::Parser

VERSION ^

$Id: html2perlstream,v 1.10 2001/08/17 00:50:00 eryq Exp $

AUTHOR ^

Eryq, 11 Jan 1997, eryq@zeegee.com or thereabouts.

Thanks (independently) to Tony Cebzanov and John Buckman for suggesting that I write a tool like this.

syntax highlighting: