Weird spread of test failures

hex on 2008-04-08T09:36:47

I recently released a new module, Encode::Base32::Crockford. While the tests for the module itself are fine, the two associated POD tests (validity and coverage) are resulting in a very strange distribution of failures (testers, matrix).

It looks like something may be objecting to my phrasing eval { something(); } skip $reason, $count if $@;. However it doesn't seem to be a single version of Perl or platform.

I think I'm going to rewrite the tests to use SKIP blocks, but I'm curious to know what's going on here - it certainly looks like a bug in something. Has anyone else encountered this?


skip_all

chromatic on 2008-04-08T17:30:52

You either need the block or to pass skip_all => $reason to plan(). Test::More relies on a particularity of Perl 5 control flow to stop executing the block in which you call skip(). If you're not in a block, Perl gets all wobbly.

Re:skip_all

hex on 2008-04-09T10:43:31

I managed to press the wrong reply button - there's a reply to your comment below.

Interesting

hex on 2008-04-09T10:42:31

Thanks for the tip. I honestly can't recall why I wrote the tests without the skip blocks in the first place - I suspect it to have been a brain fart. Conveniently hidden by the tests passing on my 5.8.8. Evidently some versions or distributions of Perl get wobblier than others.