Re: using examples as tests + Devel::Cover

2006-09-12 Thread Paul Johnson
On Tue, Sep 12, 2006 at 12:36:49PM +0300, Gabor Szabo wrote: > On 9/11/06, David Golden <[EMAIL PROTECTED]> wrote: > >They probably need to be run in the same process. What about using > >Test::Output or IO::Capture to capture the output (and keep it from > >Test::Harness) and just running the cod

Re: using examples as tests + Devel::Cover

2006-09-12 Thread Gabor Szabo
On 9/11/06, David Golden <[EMAIL PROTECTED]> wrote: They probably need to be run in the same process. What about using Test::Output or IO::Capture to capture the output (and keep it from Test::Harness) and just running the code with "do code.pl"? Thanks, this was a good idea though the main pr

Re: using examples as tests + Devel::Cover

2006-09-11 Thread David Golden
Gabor Szabo wrote: (system "code >out 2>err")... So far I have encountered only one problem with this, when I run ./Build testcover I don't get the coverage report from these example scripts. So what do you think about using examples as tests? How could I convince Devel::Cover to collect cover

using examples as tests + Devel::Cover

2006-09-11 Thread Gabor Szabo
In a module I have just started to maintain there were 0 tests but there were several exampes with their expected output. As I would like to keep the examples and I would like to have tests but I don't want to duplicate this code I added a test t/sample.t that would run each one of the example fi