From: Vincent Pit Date: Sat, 20 Sep 2008 23:05:17 +0000 (+0200) Subject: t/41-clone.t needs to call wizard into an eval block X-Git-Tag: v0.20~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=db973b1268853452f82bd5e2daa220cdac7ecb8f;p=perl%2Fmodules%2FVariable-Magic.git t/41-clone.t needs to call wizard into an eval block --- diff --git a/t/41-clone.t b/t/41-clone.t index 032fa92..71e090f 100644 --- a/t/41-clone.t +++ b/t/41-clone.t @@ -29,9 +29,11 @@ if (VMG_THREADSAFE) { my $destroyed : shared = 0; my $c : shared = 0; -my $wiz = wizard get => sub { ++$c }, - data => sub { $_[1] + threads->tid() }, - free => sub { ++$destroyed }; +my $wiz = eval { + wizard get => sub { ++$c }, + data => sub { $_[1] + threads->tid() }, + free => sub { ++$destroyed } +}; is($@, '', "wizard in main thread doesn't croak"); isnt($wiz, undef, "wizard in main thread is defined"); is($c, 0, "wizard in main thread doesn't trigger magic");