* Bill Moseley <[EMAIL PROTECTED]> [2007-11-30 18:15]:
> On Fri, Nov 30, 2007 at 04:15:59PM +0000, David Cantrell wrote:
> > I only looked at one of 'em, but in t/10-Field-CIDR_List.t,
> > you declare that you're going to run 6 tests, and then you
> > either run 6 tests or you skip *7* tests.
> 
> Yes, that was a bit more obvious.  I must have removed a test
> and then not forced it to run without that module loaded again.

    plan eval { require Net::CIDR }
        ? tests    => 6
        : skip_all => 'failed to load Net::CIDR';

Then you don’t need to keep disparate counts in synch and as a
bonus you don’t need to wrap the whole enchilada in a `SKIP`
block either.

(`eval{require $foo}` can be used directly as a boolean because
`require` returns true on success and `eval` returns undef on
exception.)

-- 
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to