我正在尝试安装Class::HPLOO perl模块,但遇到了问题。我使用的是perl版本5.28.0。我迫切需要帮助解决这个问题,从过去的几天我一直在尝试解决这个问题,但没有运气:
我尝试通过cpan进行安装,得到以下错误:
# Running under perl version 5.028000 for linux
# Current time local: Thu Aug 23 22:50:40 2018
# Current time GMT: Fri Aug 24 02:50:40 2018
# Using Test.pm version 1.31
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/({ <-- HERE \s+)/ at blib/lib/Class/HPLOO.pm line 1072.
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/(\S)( { <-- HERE ) (\S)/ at blib/lib/Class/HPLOO.pm line 1077.
not ok 1
# Failed test 1 in test.pl at line 9
# test.pl line 9 is: ok(!$@) ;
Undefined subroutine &Foo::new_call_BEGIN called at test/classtest.pm line 5.
make: *** [test_dynamic] Error 255
我已经从https://metacpan.org/pod/Class::HPLOO网站下载了模块,并尝试手动安装,但同样的问题。
# Running under perl version 5.028000 for linux
# Current time local: Fri Aug 24 12:42:24 2018
# Current time GMT: Fri Aug 24 16:42:24 2018
# Using Test.pm version 1.31
not ok 1
# Failed test 1 in test.pl at line 9
# test.pl line 9 is: ok(!$@) ;
Can't locate object method "new" via package "Foo" at test.pl line 11.
make: *** [test_dynamic] Error 2
请帮助解决此问题。提前感谢!
发布于 2018-08-26 09:47:12
除了Mob建议的更改之外,您还需要编辑模块的test.pl文件。在4个位置,您将找到"eval { require "some/path>“} ;”将其更改为"eval { require "./some/path“} ;”
此外,还会出现一个未转义的左大括号,这显然需要进行转义。
这使我成功地完成了HPLOO的安装,并继续进行DBD的成功安装。
https://stackoverflow.com/questions/52008870
复制相似问题