in reply to use Test; and output

It all depends on what your module's contract is. If it says it's going to produce some HTML in an exact way, then you need to test that exactly, hardcoding, if necessary. If it just says "will produce valid HTML/XML", etc, then you just need to test that.

In your case, I suspect the latter and I would use some other modules to check that the output is a valid form of the desired output (maybe Test::XML::Valid?).

More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier