我正在尝试下载 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/