Run tests against the code snippets. Moose::Manual apparently has some useful examples of doing this