petdance/html-lint — pull request #35 by swelljoe (2014-12-15 00:43:39+00:00)
Title: Add support for HTML::Lint::Pluggable

Test::HTML::Lint currently only supports a $lint object reference of type HTML::Lint, which prevents use of HTML::Lint::Pluggable modules in tests. I needed HTML5 support, so I did some digging, and found why it didn't work. This change allows tests using the HTML4 validator to continue to work, as before, but now makes it possible to add new validators via the pluggable interface.

Using it looks exactly the same, except for setting up the $lint object:

use HTML::Lint::Pluggable;
my $lint = new HTML::Lint::Pluggable;
$lint->load_plugins(qw/HTML5/);

html_ok( $lint, $content, "HTML validation");