I just released HTML::Lint 1.10 to the CPAN. The distro now includes Test::HTML::Lint, which I whipped together very quickly last night, as a Test::More-style interface to HTML::Lint. Now you can programatically lint output from HTML-producing functions, like so:
I'll be adding more to it, of course, but for now it's a start.
If it's not yet hit your CPAN mirror, you can also get it from sourceforge.