The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTML::Examiner - verify HTML code using custom defined rules

VERSION

Version 0.01

SYNOPSIS

  use HTML::Examiner;

  my $errors = {
    0 => {
      source => 'tag(img) misses prop(alt) => error "img misses tag";'
    }
  };

  my $examiner = HTML::Examiner->new($errors);
  my $report = $examiner->process($html);

DESCRIPTION

This module implements an engine to verify HTML code use custom defined rules. This rules are defined in a Domain Specific Language. For more documentation on writing rules see HTML::Examiner::Parser documentation.

This module is *not* intended to perform traditional HTML validations, use other modules for that purpose. Typically you don't even need to have a valid HTML document, as long as it can be correctly parsed by XML::DT.

METHODS

new

Create a new examiner instance. Reveices as argument an hash representing our costum defined error database.

examine

Call this method to examine HTML code. The code is passed as an argument.

__parse_rule

Method to parse a rule a custom defined rule. You shoulnd't have to call this method directly.

report

This method is used to feed report information when verifying custom defined rules.

AUTHOR

Nuno Carvalho, <smash at cpan.org>

BUGS

Please report any bugs or feature requests to bug-html-examiner at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Examiner. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc HTML::Examiner

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2010 Nuno Carvalho.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.