X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F41-clone.t;h=71e090f0419c3cce701882ac59d24bbd4da5e33b;hb=db973b1268853452f82bd5e2daa220cdac7ecb8f;hp=032fa92d3b85e8072406322700b9e7e5e211a457;hpb=73394f27221b951647864ce37cf623661c480d2e;p=perl%2Fmodules%2FVariable-Magic.git 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");