无法在 Ubuntu 14.10 上安装 Proc::Daemon

Failed to install Proc::Daemon on Ubuntu 14.10

我正在尝试在 Ubuntu 14.10 (Perl v5.20) 上安装 Proc::Daemon :

$ cpanm Proc::Daemon
--> Working on Proc::Daemon
Fetching http://www.cpan.org/authors/id/A/AK/AKREAL/Proc-Daemon-0.20.tar.gz ... OK
Configuring Proc-Daemon-0.20 ... OK
Building and testing Proc-Daemon-0.20 ... FAIL
! Installing Proc::Daemon failed. See /home/hakon/.cpanm/work/1437385026.3674/build.log for details. Retry with --force to force install it.

完整日志在这里:http://pastebin.com/8s7ndGaC。 第一个失败的测试似乎是:

#   Failed test ''kid.pl' daemon is still running'
#   at /home/hakon/.cpanm/work/1437385026.3674/Proc-Daemon-0.20/t/02_testmodule.t line 116.
#   Failed test 'stop daemon 'kid.pl''
#   at /home/hakon/.cpanm/work/1437385026.3674/Proc-Daemon-0.20/t/02_testmodule.t line 119.
Use of uninitialized value in numeric eq (==) at /home/hakon/.cpanm/work/1437385026.3674/Proc-Daemon-0.20/t/02_testmodule.t line 129.

测试脚本02_testmodule.t在这里:https://api.metacpan.org/source/AKREAL/Proc-Daemon-0.20/t/02_testmodule.t (and here http://pastebin.com/E0n116bA)

测试脚本中的第 115-119 行:

$pid = $daemon->Status( "$cwd/pid_1.file" );
                    ok( $pid == $Kid_PID2, "'kid.pl' daemon is still running" );

                    my $stopped = $daemon->Kill_Daemon();
                    ok( $stopped == 1, "stop daemon 'kid.pl'" );

This issue was reported and has been resolved in version 0.21.