我编写了这段代码,它在系统中安装了POE模块时起作用。eval和使用问题
#!/usr/bin/perl
use strict;
use warnings;
use POE;
...
但我想,以确定是否该模块有:
#!/usr/bin/perl
use strict;
use warnings;
eval("use POE; 1") or die ('Please, install POE module. \n');
...
,并返回:
Bareword "KERNEL" not allowed while "strict subs" in use at ./terminalhero.perl line 58.
Bareword "HEAP" not allowed while "strict subs" in use at ./terminalhero.perl line 60.
Execution of ./terminalhero.perl aborted due to compilation errors.
我尝试过其他的模块,也有错误。我如何使用严格模式来做我想要的?
'terminalhero.perl'的内容是什么?特别是第58行和第60行。 – Trott
请重新发布代码。如果参考文件不存在,SO就会变得无用 – JGurtz