From 7929e252cd85f3ccb4e700ccf994778830935b61 Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Thu, 16 Jul 2020 15:59:15 -0600 Subject: [PATCH] Fix some indirect calls in threds Fixes #12 --- dist/threads/lib/threads.pm | 2 +- dist/threads/t/thread.t | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm index fa56aa43a18..3474445fcd1 100644 --- a/dist/threads/lib/threads.pm +++ b/dist/threads/lib/threads.pm @@ -59,7 +59,7 @@ sub import } } elsif ($sym =~ /^str/i) { - import overload ('""' => \&tid); + overload->import('""' => \&tid); } elsif ($sym =~ /^(?::all|yield)$/) { push(@EXPORT, qw(yield)); diff --git a/dist/threads/t/thread.t b/dist/threads/t/thread.t index 4dc1a292d84..d53706e6e06 100644 --- a/dist/threads/t/thread.t +++ b/dist/threads/t/thread.t @@ -116,11 +116,11 @@ sub threaded { my $longe = " short."; my $foo = "This is bar bar bar."; my $fooe = " bar bar bar."; - my $thr3 = new threads \&threaded, $short, $shorte; - my $thr4 = new threads \&threaded, $long, $longe; - my $thr5 = new threads \&testsprintf, 19; - my $thr6 = new threads \&testsprintf, 20; - my $thr7 = new threads \&threaded, $foo, $fooe; + my $thr3 = threads->new( \&threaded, $short, $shorte ); + my $thr4 = threads->new( \&threaded, $long, $longe ); + my $thr5 = threads->new( \&testsprintf, 19 ); + my $thr6 = threads->new( \&testsprintf, 20 ); + my $thr7 = threads->new( \&threaded, $foo, $fooe ); ok($thr1->join()); ok($thr2->join());