Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前在脚本上有这个:
CPAN::Shell->rematein("notest", "install", "$m");
其中 $m 是脚本安装的模块名称。但是,我希望在不提示用户是否应安装其他依赖项(可选的 deps 与否)的情况下安装模块,我该怎么做?
您prerequisites_policy在 CPAN::Config 中的设置是什么?那应该是follow而不是ask。
prerequisites_policy
follow
ask
在这里找到了答案。
设置PERL_MM_USE_DEFAULT=1在您的环境中。
PERL_MM_USE_DEFAULT=1