Some folks like to use labeled blocks as an odd form of commenting. However, if you look at how Test::More implements SKIP blocks, you'll be rather horrified at the how it works :) (if the SKIP value is true, there's a last SKIP call).
sub skip { my($why, $how_many) = @_; my $tb = Test::More->builder; unless( defined $how_many ) { # $how_many can only be avoided when no_plan is in use. _carp "skip() needs to know \$how_many tests are in the block" unless $tb->has_plan eq 'no_plan'; $how_many = 1; } for( 1..$how_many ) { $tb->skip($why); } local $^W = 0; last SKIP; }
That relies on the SKIP label in the test, even though you don't see the last call.
Cheers,
Ovid
New address of my CGI Course.
In reply to Re: What's the point of a labeled block without a loop?
by Ovid
in thread What's the point of a labeled block without a loop?
by JohnMG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |