cpanm不会在perllocal.pod中注册所有已安装的模块 [英] cpanm does not register all installed modules in perllocal.pod

查看:136
本文介绍了cpanm不会在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

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆