我验证了该软件包是使用perldoc -l Thread :: Semaphore安装的,但我仍然收到此错误:
Can't locate object method "down_force" via package "Thread::Semaphore" at <filename line#>
我的代码:
: #use perl
eval 'exec perl -S $0 ${1+"$@"}'
if 0;
use threads;
use threads::shared;
use Thread::Semaphore;
my $s = Thread::Semaphore->new();
$s->down_force(); #it complains about this one
#some code here...
答案 0 :(得分:3)
您可能拥有version 2.09 of Thread::Semaphore,其中没有down_force()
方法。尝试升级到most recent version,目前为2.12。