From: Vincent Pit Date: Sun, 6 May 2012 13:16:42 +0000 (+0200) Subject: Reuse the diag() helper in the TestThreads module X-Git-Tag: v0.49~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ebb996c77fcaf93bb85862732f33530ea85f43e0;p=perl%2Fmodules%2FVariable-Magic.git Reuse the diag() helper in the TestThreads module --- diff --git a/t/lib/Variable/Magic/TestThreads.pm b/t/lib/Variable/Magic/TestThreads.pm index a846a5a..4a18667 100644 --- a/t/lib/Variable/Magic/TestThreads.pm +++ b/t/lib/Variable/Magic/TestThreads.pm @@ -15,7 +15,7 @@ sub skipall { sub diag { require Test::More; - Test::More::diag(@_); + Test::More::diag($_) for @_; } sub import { @@ -66,10 +66,7 @@ sub spawn { threads->create(@_); }; push @diag, "Thread creation error: $@" if $@; - if (@diag) { - require Test::More; - Test::More::diag($_) for @diag; - } + diag(@diag) if @diag; return $thread ? $thread : (); }