
=encoding UTF-8

=head1 NAME

HTML::Valid - tidy/validate HTML

=head1 SYNOPSIS

    
    use FindBin '$Bin';
    use HTML::Valid;
    my $html = <<EOF;
    <ul>
    <li>Shape it up
    <li>Get straight
    <li>Go forward
    <li>Move ahead
    <li>Try to detect it
    <li>It's not too late
    EOF
    my $htv = HTML::Valid->new ();
    my ($output, $errors) = $htv->run ($html);
    print "$output\n";
    print "$errors\n";


outputs

    <!DOCTYPE html>
    <html>
    <head>
    <meta name="generator" content=
    "HTML Tidy for HTML5 for FreeBSD version 5.0.0">
    <title></title>
    </head>
    <body>
    <ul>
    <li>Shape it up</li>
    <li>Get straight</li>
    <li>Go forward</li>
    <li>Move ahead</li>
    <li>Try to detect it</li>
    <li>It's not too late</li>
    </ul>
    </body>
    </html>
    
    line 1 column 1 - Warning: missing <!DOCTYPE> declaration
    line 1 column 1 - Warning: inserting implicit <body>
    line 1 column 1 - Warning: missing </ul>
    line 1 column 1 - Warning: inserting missing 'title' element
    Info: Document content looks like HTML5
    4 warnings, 0 errors were found!
    
    


=head1 VERSION

This document describes HTML::Valid version 0.00_03. This
corresponds to HTML Tidy version 5.0.0.

=head1 DESCRIPTION

Validate/repair HTML. This is based on HTML Tidy, but not on the Perl
module L<HTML::Tidy>.

=head1 FUNCTIONS

=head2 new

    my $htv = HTML::Valid->new ();

=head2 set_filename

    $htv->set_filename ('file.html');

Set the file name for error reporting to F<file.html>.

=head2 run

    my ($output, $errors) = $htv->run ($content);

Get the tidy HTML output and errors.

=head1 SEE ALSO

=over

=item L<HTML Tidy|http://www.tidy-html.org/>

=back

=head1 COPYRIGHT AND LICENCE

HTML::Valid is based on HTML Tidy, which is under the following copyright:

    Copyright (c) 1998-2008 World Wide Web Consortium
    (Massachusetts Institute of Technology, European Research
    Consortium for Informatics and Mathematics, Keio University).
    All Rights Reserved.

    COPYRIGHT NOTICE:

    This software and documentation is provided "as is," and
    the copyright holders and contributing author(s) make no
    representations or warranties, express or implied, including
    but not limited to, warranties of merchantability or fitness
    for any particular purpose or that the use of the software or
    documentation will not infringe any third party patents,
    copyrights, trademarks or other rights.

    The copyright holders and contributing author(s) will not be held
    liable for any direct, indirect, special or consequential damages
    arising out of any use of the software or documentation, even if
    advised of the possibility of such damage.

    Permission is hereby granted to use, copy, modify, and distribute
    this source code, or portions hereof, documentation and executables,
    for any purpose, without fee, subject to the following restrictions:

    1. The origin of this source code must not be misrepresented.
    2. Altered versions must be plainly marked as such and must
    not be misrepresented as being the original source.
    3. This Copyright notice may not be removed or altered from any
    source or altered source distribution.

The Perl parts of this distribution are copyright (C) 2015 Ben Bullock
and may be used under either the above licence terms, or the usual
Perl conditions, either the GNU General Public Licence or the Perl
Artistic Licence.




