in reply to Embedding tests?
sub foo { ... } unless (caller) { ... your tests go here ... } [download]