in reply to html/mason parser

You might could twiddle a custom HTML::Mason::Compiler subclass (and/or HTML::Mason::Lexer) and spit out just the non-code chunks. I believe that the Mason book has an example you could crib from in chapter 12.