Sometimes you've got a big codebase that isn't just Perl. Maybe you've got PHP mixed in with it, and you want to test the PHP along with all the Perl code, too. Perl's *prove* program doesn't care if the testing results it parses are from Perl, PHP or even static files, so long as they're in the [TAP]( format. However, actually getting *prove* to run those PHP programs takes a little doing. Fortunately, Test::Harness 3.xx has hooks for source handlers. David Wheeler has written about running PostgreSQL tests under *prove* [in his blog]( and I stole from his code shamelessly to create [TAP::Parser::SourceHandler::PHP](, released to the CPAN this morning. So now, to run the Perl .t files and the PHP .phpt files all in one swell foop, here's what we do at work:
prove -r 
--source=Perl --ext=.t 
That --source=PHP tells *prove* to load up TAP::Parser::SourceHandler::PHP. The --php-option tells *prove* to pass those options through to the SourceHandler. If we had PostgreSQL tests or MySQL tests, we could use the SourceHandlers for those that David Wheeler has written as well. Now we can test everything all in one run, and we get all the benefits of Test::Harness 3.xx, like parallel tests and TAP archiving and so on.