On Sat, Jun 04, 2005 at 02:10:37AM -0700, Michael G Schwern wrote: > On Fri, Jun 03, 2005 at 02:04:50PM -0500, Pete Krawczyk wrote: > > }How can I use 'prove' and Devel::Cover together? I tried: > > > > HARNESS_PERL_SWITCHES=-MDevel::Cover prove file.t > > Kinda surprised there's not a --cover switch.
I happen to stumble upon merlyn's answer to this in the test suite for CGI::Prototype. He created a script called 'cprove' for this purpose, and it looks like this: #!/bin/sh cover -delete PERL5OPT=-MDevel::Cover=+inc,/Volumes/UFS prove -v -I../lib "$@" && cover Of course, having a hard-coded path to his hard-drive is a drawback, but's an example of a nice simple solution that gets you out of the business of remembering so much syntax to type each time. Mark -- http://mark.stosberg.com/