1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use strict; use warnings; use Test::CanThread qw/AUTHOR_TESTING/; use Test::More; { my $todo = sub { my $out; ok(1); 42; }; is( threads->create($todo)->join, 42, "Correct result after do-er", ); } done_testing;