I'm going to talk about state of CSS parsers in Perl:
-- they don't work. CSS::Tiny, CSS.pm (both parsers), CSS::SAC.... no go.
Also looked at packaging csstidy, but it's not quite what we want either, and would be a lot of work, wasn't written with security in mind I imagine, etc, etc.
So let's assume I have to write my own CSS parser, or at least fix up CSS::SAC (which seems to be the most promising). How to test?
The CSS cleaner works like:
CSS -> parse -> parse tree -> clean -> serialize -> clean CSS
So how do I do a semantic diff of two CSS files, when I don't trust the parser?
Mozilla (Firefox) has a great CSS parser. Let's use that to test!
Except now I have to fix CSS::SAC or something. Bleh.