makepmdist 1.02

2002-04-12 Thread Sean M. Burke

I've now made a public release of makepmdist, the program that I mentioned 
here about two months ago.
http://www.cpan.org/authors/id/S/SB/SBURKE/makepmdist_1.02.pl

One idea (which Mark Jason Dominus gave  me) that I'm thinking of 
implementing in the next version is a way to tell makepmdist "Don't 
consider the lack of documentation to be a fatal error", and/or "Just run 
the tests for this module".  I didn't think there'd be a call for either 
option, because I was thinking just in terms of bundling up completed 
modules.  But MJD pointed out that such options might be useful as you're 
developing the module.


--
Sean M. Burkehttp://www.spinn.net/~sburke/




Re: Test::Exception... comments?

2002-04-12 Thread Adrian Howard

on 11/4/02 2:37 am, Curt Sampson at [EMAIL PROTECTED] wrote:

> On Tue, 9 Apr 2002, Michael G Schwern wrote:
> 
>>> I'm not sure exactly what the purpose of this is; your test will
>>> still fail if it dies even when not in a lives_ok block, right?
>> 
>> It'll fail and take the whole rest of the test program with it.  Some
>> testing systems like to abort the test script on failure.  Perl's
>> doesn't.
> 
> I'm not entirely sure I buy this, since the framework seems perfectly
> happy to tell me that something is wrong whether I complete all
> the tests in a script or not. But it's hardly a point worth arguing.
[snip]

Arguing anyway just for the sake of it :-)

My motivation was testing code that threw a lot of exceptions to signify
error conditions... so you had variations on things like:

my @test_cases = (
[1,2,3] => [3,2,1],
["foo"] => ["oof"],
);

while (@test_cases) {
my ($test_args, $test_results) = (shift @test_cases, shift @test_cases);
my @results;
lives_ok {@results = $foo->method(@$test_args) }
"method(@$test_args) succeeded";
is_deeply(\@results, $test_results,
"method(@$test_args) = (@$test_results)");
};

The sequence of tests was stateless --- one test failing didn't invalidate
the other test cases. Running them all rather than exiting the test script
after a single failure seems to be a Good Thing.

It helped with my debugging anyway ;-)

Cheers,

Adrian
--
Adrian Howard  <[EMAIL PROTECTED]>
phone: 01929 550720  fax: 0870 131 3033  http://www.quietstars.com/