HTML::Examiner - verify HTML code using custom defined rules
Version 0.01
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);
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.
Create a new examiner instance. Reveices as argument an hash representing our costum defined error database.
Call this method to examine HTML code. The code is passed as an argument.
Method to parse a rule a custom defined rule. You shoulnd't have to call this method directly.
This method is used to feed report information when verifying custom defined rules.
Nuno Carvalho, <smash at cpan.org>
<smash at cpan.org>
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.
bug-html-examiner at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc HTML::Examiner
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Examiner
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/HTML-Examiner
CPAN Ratings
http://cpanratings.perl.org/d/HTML-Examiner
Search CPAN
http://search.cpan.org/dist/HTML-Examiner/
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.
To install HTML::Examiner, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Examiner
CPAN shell
perl -MCPAN -e shell install HTML::Examiner
For more information on module installation, please visit the detailed CPAN module installation guide.