________________________________
> 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
>
> On 2011-03-29 23:05, Michael Ludwig wrote:
> >> Perhaps the 'bail_on_fail' or 'die_on_fail' functions from Test::Most
> >> would help you here?
> > 
> > That's very convenient.
>
> 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).

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.

Cheers,
Ovid

--
Live and work overseas - http://overseas-exile.blogspot.com/
Buy the book           - http://www.oreilly.com/catalog/perlhks/
Tech blog              - http://blogs.perl.org/users/ovid/
Twitter                - http://twitter.com/OvidPerl/

Reply via email to