On Wed, Mar 30, 2011 at 5:58 AM, Ovid <publiustemp-perl...@yahoo.com> wrote:
> ________________________________
>> From: Jozef Kutej <jo...@kutej.net>
>> To: perl-qa@perl.org
>> Sent: Wed, 30 March, 2011 7:54:21
>> Subject: Re: Conditional tests - SKIP, die, BAILOUT
>> :
>> :
>> perl -le 'use Test::More tests => 2; ok(1) or die; ok(1);'
>> perl -le 'use Test::More tests => 2; ok(0) or die; ok(1);'
>
>
> True, but advantage of using Test::Most is that not only do you not have to 
> add
> the "or die" to every test which might potentially fail, but you get the most
> common testing functionality as determined by analyzing what testing modules
> people were actually using (by running code against my minicpan installation).

Plus, with the "or die" approach, you can only mimic Test::Most's "die
on fail" capability, whereas the "bail on fail" capability is far more
useful, IMHO.  Plus plus, with the "or die" approach, you're _always_
dying on fail.  With Test::Most, you can activate that by changing one
line of code, or (even better) by setting an environment variable and
not changing any code at all.

> At this point, I would suggest that Test::More might be for code that you put 
> on
> the CPAN (assuming you don't want to force dependencies on people), but I'd
> never want to do without Test::Most for personal code.

Agree 100%.


            -- Buddy

Reply via email to