我已经从 debian 的 repoDebian GNU/Linux trixie/sid
安装了publican。(publican 正在为 进行写入和发布DocBook
)
当我运行时publican
,它会收到以下消息:
Attempt to call undefined import method with arguments ("abs2rel") via package "File::Spec" (Perhaps you forgot to load the package?) at /usr/share/perl5/Publican/TreeView.pm line 12.
Duplicate specification "help" for option "help"
Can't open publican: No such file or directory at /usr/bin/publican line 646.
我的 publican 版本是4.3.2-4
。
我还libfile-spec-native-perl
从 repo 安装了软件包。
然后我通过以下方式下载源代码:
apt source publican
然后运行publican,出现以下错误:
mohsen@debian:~/src-compiled/publican/publican-4.3.2/bin$ ./publican
Attempt to call undefined import method with arguments ("abs2rel") via package "File::Spec" (Perhaps you forgot to load the package?) at /usr/share/perl5/Publican/TreeView.pm line 12.
Duplicate specification "help" for option "help"
Action required!
根据以上Action Required!
字符串添加到输出。
我不知道该如何解决。
如果你解决了我的问题,我会很高兴。
消息“尝试调用未定义的导入方法...”是 Perl 5.40.0 中引入的警告(请参阅perl5400delta)。旧版本的 Perl 不会显示此警告。
尽管如此,在这种情况下,警告是正确的。File ::Spec使用面向对象,不导出任何内容。publican 中的代码应该使用File::Spec::Functions。ancinet版本可能
File::Spec
直接导出函数,但我在 Perl 的 git 历史记录中找不到这样的版本,因为源文件多年来被移动到了不同的位置。看起来 publican 太老了,没有跟上 Perl 的步伐。你可以尝试更改行
到
但您可能会遇到其他类似的问题。