cpanm不会在perllocal.pod中注册所有已安装的模块 [英] cpanm does not register all installed modules in perllocal.pod
问题描述
根据 CPAN常见问题:
每次在系统上安装模块时,它都会附加信息 到名为
perllocal.pod
Each time a module is installed on your system, it appends information to a file called
perllocal.pod
我已经使用cpanm
安装了多个CPAN模块,问题是某些模块未在perllocal.pod
中注册.例如,我已经安装了 String :: Escape , String :: Util 使用cpanm
.如果我输入
I have installed several CPAN modules using cpanm
, the problem is that some modules do not get registered in perllocal.pod
. For example, I have installed String::Escape, String::ShellQuote, and String::Util using cpanm
. If I type
$ perldoc -u perllocal | grep String::
我得到输出:
=head2 Tue Apr 21 16:47:34 2015: C<Module> L<String::Escape|String::Escape>
=head2 Thu Aug 6 18:51:04 2015: C<Module> L<String::ShellQuote|String::ShellQuote>
请注意,即使所有三个模块都安装在目录/home/hakon/perl5/lib/perl5/
下,也缺少String::Util
.例如,如果我输入:
Note that String::Util
is missing, even if all three modules are installed under directory /home/hakon/perl5/lib/perl5/
. For example, if I type:
$ perldoc -l String::Util
我得到输出:
/home/hakon/perl5/lib/perl5/String/Util.pod
注意:该问题与perldoc
无关. perldoc
命令仅在文件perllocal.pod
中显示Pod:
Note: The problem is not related to perldoc
. The perldoc
command simply displays the Pod in the file perllocal.pod
:
$ perldoc -l perllocal
/home/hakon/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
由于此文件不包含String::Util
的任何Pod,因此问题可能出在我安装模块时cpanm
没有注册(出于某些未知原因).
Since this file does not contain any Pod for String::Util
, it is likely that the problem is that cpanm
did not register it ( for some unknown reason ) when I installed the module.
推荐答案
这是 Makefile.PL in String :: Util;通过在WriteMakefile中使用中间变量,它会阻止App :: cpanminus中的解析.
This is the fault of the Makefile.PL in String::Util; by using an intermediary variable in WriteMakefile it thwarts the parsing in App::cpanminus.
我建议您将此日志记录为错误 -修复起来很简单:根本不用变量.
I suggest you log this as a bug -- it has an easy fix: simply don't use the variable.
这篇关于cpanm不会在perllocal.pod中注册所有已安装的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!