cpanm does not register all installed modules in perllocal.pod

假如想象 提交于 2019-12-13 03:36:39

问题


According to CPAN Frequently Asked Questions:

Each time a module is installed on your system, it appends information to a file called perllocal.pod

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::

I get output:

=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>

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

I get output:

/home/hakon/perl5/lib/perl5/String/Util.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

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.


回答1:


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.



来源:https://stackoverflow.com/questions/32679413/cpanm-does-not-register-all-installed-modules-in-perllocal-pod

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!