in reply to Tidy with HTML::Mason

If you're running under mod_perl, you might want to look into enabling stacked handlers and then chain a handler which runs tidy over the output of the real Mason handler. I believe the mod_perl Developer's Cookbook has an example of doing something similar (using HTML::Clean).