我如何说服 cpanminus 在 lib/ 而不是 lib/perl5 中安装模块?
How do I convince cpanminus to install modules in lib/ instead of lib/perl5?
我正在将 cpanfile
中列出的一堆模块安装到独立目录中:
cpanm -L bundle --quiet --notest --self-contained --with-recommends --installdeps .
之后,所有模块都在bundle/lib/perl5
。这几乎正是我想要的。是否有一个咒语来提供 cpanm
— 或者一个环境变量来设置 — 让 cpanm
告诉安装程序将文件放在 bundle/lib
中?我假设我需要做一些事情来说服 ExtUtils::MakeMaker 和 Module::Build 将不同的值附加到 install_base
,但我一直无法弄清楚如何。
浏览 Module::Build source, it looks like it's not possible to install modules without the perl5
part of the directory — at least not when using install_base
(which cpanm's --self-contained
implies). Judging from the comment, it appears that the decision was made to be consistent about always installing in lib/perl5
when using install_base
, so as to keep things as predictable as possible. It looks like MakeMaker has it hard-coded,到。
我正在将 cpanfile
中列出的一堆模块安装到独立目录中:
cpanm -L bundle --quiet --notest --self-contained --with-recommends --installdeps .
之后,所有模块都在bundle/lib/perl5
。这几乎正是我想要的。是否有一个咒语来提供 cpanm
— 或者一个环境变量来设置 — 让 cpanm
告诉安装程序将文件放在 bundle/lib
中?我假设我需要做一些事情来说服 ExtUtils::MakeMaker 和 Module::Build 将不同的值附加到 install_base
,但我一直无法弄清楚如何。
浏览 Module::Build source, it looks like it's not possible to install modules without the perl5
part of the directory — at least not when using install_base
(which cpanm's --self-contained
implies). Judging from the comment, it appears that the decision was made to be consistent about always installing in lib/perl5
when using install_base
, so as to keep things as predictable as possible. It looks like MakeMaker has it hard-coded,到。