{
my ($thread) = threads->create(sub { return (1,2,3) });
my @retval = $thread->join();
- ok($retval[0] == 1 && $retval[1] == 2 && $retval[2] == 3);
+ ok($retval[0] == 1 && $retval[1] == 2 && $retval[2] == 3,'');
}
{
my $retval = threads->create(sub { return [1] })->join();
- ok($retval->[0] == 1,"Check that a array ref works");
+ ok($retval->[0] == 1,"Check that a array ref works",);
}
{
my $retval = threads->create(sub { return { foo => "bar" }})->join();
{
my $test = "hi";
my $retval = threads->create(sub { return $_[0]}, \$test)->join();
- ok($$retval eq 'hi');
+ ok($$retval eq 'hi','');
}
{
my $test = "hi";
share($test);
my $retval = threads->create(sub { return $_[0]}, \$test)->join();
- ok($$retval eq 'hi');
+ ok($$retval eq 'hi','');
$test = "foo";
- ok($$retval eq 'foo');
+ ok($$retval eq 'foo','');
}
{
my %foo;