perl - 下载 CPAN 模块分发存档:I18N::Langinfo

标签 perl

我正在尝试下载 I18N::Langinfo 的模块分发存档:

cpan -g I18N::Langinfo

这给了我一个 14 兆字节的文件 perl-5.22.1.tar.bz2。此存档包含 5633 个文件,其中子文件夹 ext/I18N-Langinfo 包含我感兴趣的 4 个文件。

为什么我还得到所有其他文件?当我下载模块分发存档时,我希望获得该分发中的文件,我对 5629 个其他文件不感兴趣。

最佳答案

I18N::Langinfo 是一个核心模块,不会在 CPAN 上单独发布(例如,它不是像 Data::Dumper 这样的“双重生活”模块)。要获取模块的源代码,您必须获取整个 Perl 源代码树。

参见 perlsource :

Modules shipped as part of the Perl core live in four subdirectories. Two of these directories contain modules that live in the core, and two contain modules that can also be released separately on CPAN. Modules which can be released on cpan are known as "dual-life" modules.

...

  • ext/

    Like lib/, this directory contains modules which are only released as part of the core. Unlike lib/, however, a module under ext/ generally has a CPAN-style directory- and file-layout and its own Makefile.PL. There is no expectation that a module under ext/ will work with earlier versions of Perl 5. Hence, such a module may take full advantage of syntactical and other improvements in Perl 5 blead.

关于perl - 下载 CPAN 模块分发存档:I18N::Langinfo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36248433/

相关文章:

perl - 服务器如何知道关闭网站选项卡时关闭websocket的连接

Perl - 如何直接在 Perl shell/解释器中键入/执行/运行 Perl 语句?

xml - 解析 Wiki XML 转储 ver0.4 变得很困难

perl - 将带引号的字符串传递给system(),使引号保持完整

perl - perl中的随机二项分布数据集

java - RabbitMQ 与应用程序解耦

perl - 声明使用哪个版本的 Perl 的现代方式是什么?

linux - 使用perl cgi在网页上显示命令输出

perl - 我如何安装 Perl 的 Lingua::Lid?

regex - 如何使用 Perl 从路径中提取文件名?