From: Yuval Kogman Date: Fri, 27 Jun 2008 09:53:37 +0000 (+0000) Subject: do while sucks X-Git-Tag: 0_55~79 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57b3546f5b6b9abae83780b8b6a0592a640fba89;p=gitmo%2FMoose.git do while sucks --- diff --git a/t/100_bugs/015_immutable_n_around.t b/t/100_bugs/015_immutable_n_around.t index 3ce80cf..e5599b8 100644 --- a/t/100_bugs/015_immutable_n_around.t +++ b/t/100_bugs/015_immutable_n_around.t @@ -38,11 +38,14 @@ use Test::More 'no_plan'; my @classes = qw(Foo Bar Gorch Zoink); -do { +tests: { is( Foo->new->foo, undef, "base class (" . (Foo->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Bar->new->foo, 42, "around new called on Bar->new (" . (Bar->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Gorch->new->foo, 42, "around new called on Gorch->new (" . (Gorch->meta->is_immutable ? "immutable" : "mutable") . ")" ); is( Zoink->new->foo, 42, "around new called Zoink->new (" . (Zoink->meta->is_immutable ? "immutable" : "mutable") . ")" ); - ( shift @classes )->meta->make_immutable; -} while @classes; + if ( @classes ) { + ( shift @classes )->meta->make_immutable; + redo tests; + } +}