From: Vincent Pit Date: Sat, 25 Dec 2010 11:02:14 +0000 (+0100) Subject: Lock before setting $no_diag X-Git-Tag: v0.01~19 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=1303eb57577f22a6e056b6a237ce3b304c0d7299;p=perl%2Fmodules%2FTest-Leaner.git Lock before setting $no_diag --- diff --git a/lib/Test/Leaner.pm b/lib/Test/Leaner.pm index 336bf31..9e39fe5 100644 --- a/lib/Test/Leaner.pm +++ b/lib/Test/Leaner.pm @@ -143,6 +143,7 @@ sub import { push @imports, @{ $_[$i+1] }; $splice = 2; } elsif ($item eq 'no_diag') { + lock $plan if THREADSAFE; $no_diag = 1; $splice = 1; }