Test::Harness's verbose mode considered useful

ChrisDolan on 2006-09-24T02:06:58

There's a ton of discussion on TAP and test harnesses lately on the perl-qa[at]perl.org mailing list. I had my own funny harness discovery today.

I was fixing a bug in the SWF-to-FLV converter in my FLV::Info package and, along the way, added a print() to dump some binary data to the terminal. Well, of course, I forgot to remove it. Test::Harness quietly discards any cruft sent to STDOUT, so my "./Build test" didn't reveal the extraneous output.

Luckily my release-to-cpan script runs "./Build test verbose=1" so I saw the output. Or, heard it really... The output happened to contain a lot of ^G bytes, so I got a loooong series of beeps from the Mac Terminal.app, which is hard to stop short of killing the shell. Anyway I aborted the script and fixed the oversight before uploading to CPAN.

So my tiny bit of new wisdom to pass on: always run test verbosely at least once before you release to CPAN!