in reply to Re^2: Test Blocks and skipping
in thread Test Blocks and skipping

step a; testBlock("Block1",checkSomething) step b; }

What does the unbalanced curly right bracket mean?

The closest I can whip up - with a bit of syntax change - is

sub checkSomething { 0 } sub testBlock (**&) { my ($block,$cond,$sub) = @_; my $test = &{$cond}; $test ? &$sub : warn "not running code for $block since '$cond' fa +iled \n"; } testBlock "Block1", 'checkSomething', sub { print "done\n"; # or another test };

But I do ask - what good is it to provide test suites for somebody who doesn't grok if/else, and what could that target user possibly debug?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}