Re: prove with Devel::Cover example?
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/
Re: prove with Devel::Cover example?
On 2005-06-04, Michael G Schwern <[EMAIL PROTECTED]> 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 was surprised there wasn't a more general "-M" switch, but maybe there is a technical for research for that. Mark -- http://mark.stosberg.com/
Re: prove with Devel::Cover example?
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. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern ROCKS FALL! EVERYONE DIES! http://www.somethingpositive.net/sp05032002.shtml
Re: prove with Devel::Cover example?
On Fri, Jun 03, 2005 at 06:44:53PM +, Mark Stosberg wrote: > Ok, I'm feeling brain dead about this one-- this seems easy but I'm > missing it. > > How can I use 'prove' and Devel::Cover together? I tried: > > perl -MDevel::Cover prove ... > > but didn't cover the scripts that ran. > > Mark > prove is just a cover over Test::Harness, so (if I remember correctly) HARNESS_PERL_SWITCHES=-MDevel::Cover prove ... should work. Steve Peters [EMAIL PROTECTED]
Re: prove with Devel::Cover example?
Subject: prove with Devel::Cover example? From: Mark Stosberg <[EMAIL PROTECTED]> Date: Fri, 3 Jun 2005 18:44:53 + (UTC) }How can I use 'prove' and Devel::Cover together? I tried: HARNESS_PERL_SWITCHES=-MDevel::Cover prove file.t -Pete K -- Pete Krawczyk perl at bsod dot net