... that this would work?
SKIP: {
print "first\n";
SKIP: {
print "second\n";
SKIP: {
print "third\n";
last SKIP;
print "shouldn't print\n";
}
print "leaving second\n";
}
print "leaving first\n";
}
with output
first
second
third
leaving second
leaving first
Not only does it compile, but it works as you'd expect: the last leaves only the innermost SKIP block. Or maybe I should say "it works the way I want it to".
This means that Test::More SKIP blocks can be nested and the Right Thing will happen. Why this matters will be made clear in a module I'll be releasing soon that wraps up Test::More-like retryable tests in a nice syntax.
Never read the llama, I take it? (Score:2)
Re:Never read the llama, I take it? (Score:1)
Looking back, it's not so surprising - I knew that last was pretty intelligent in its behavior, and that it was perfectly OK to have the same label in a program multiple times (e.g - multiple SKIP blocks in a test). I just hadn't explicitly nested multiple identical labels before, and was quite pleased that it worked, since I need it to.