Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

HTML::FormatText

Name HTML::FormatText
Version 2.16
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/HTML/FormatText.pm
Is Core No
Search CPAN for this module HTML::FormatText
Documentation HTML::FormatText
Module Details HTML::FormatText


NAME

HTML::FormatText - Format HTML as plaintext


VERSION

version 2.16


SYNOPSIS

    use HTML::TreeBuilder;
    $tree = HTML::TreeBuilder->new->parse_file("test.html");
    use HTML::FormatText;
    $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50);
    print $formatter->format($tree);

or, more simply:

    use HTML::FormatText;
    my $string = HTML::FormatText->format_file(
        'test.html',
        leftmargin => 0, rightmargin => 50
        );


DESCRIPTION

HTML::FormatText is a formatter that outputs plain text. All character attributes (bold/italic/underline) are ignored. Formatting of HTML tables and forms is not implemented.

HTML::FormatText is built on the HTML::Formatter manpage and documentation for that module applies to this - especially new in the HTML::Formatter manpage, format_file in the HTML::Formatter manpage and format_string in the HTML::Formatter manpage.

You might specify the following parameters when constructing the formatter:

leftmargin (alias lm)
The column of the left margin. The default is 3.

rightmargin (alias rm)
The column of the right margin. The default is 72.


SEE ALSO

the HTML::Formatter manpage


AUTHORS


COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024