非交互式运行Build.pl [英] run Build.pl non-interactive

查看:70
本文介绍了非交互式运行Build.pl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当某些Perl项目的 Build.pl 在以前未用于Perl开发的系统上运行时,如果用户希望将某些软件包添加到前面,它将一次又一次中断。

When Build.pl of some Perl project is run on systems not used for Perl development before, it interrupts again and again if the user would like to prepend certain packages to the installation.

有没有办法获得 Build.PL 的非交互式默认运行?要观看几个小时,然后一次又一次按下'enter'?

Is there any way to get a non-interactive default run of the Build.PL without having to watch it for hours and press 'enter' again and again?

推荐答案

PERL_MM_USE_DEFAULT = 1


如果设置为true值,则MakeMaker的提示函数将始终返回默认值,而无需等待用户输入。

If set to a true value then MakeMaker's prompt function will always return the default without waiting for user input.

在Module :: Build中工作相同。

PERL_EXTUTILS_AUTO INSTALL =-default-deps


-alldeps将安装所有功能,而- -defaultdeps将仅安装默认答案为 y的功能。

--alldeps will install all features, while --defaultdeps will only install features for which the default answer is 'y'.






如果您使用CPAN,还需要配置 prerequisites_policy = follow

这处理了大多数提示。有几个坏苹果仍需要某种形式的人工干预。 Distroprefs 照顾好他们,请参阅 distroprefs 目录

This takes care of most prompts. There are a couple of bad apples that still require some form of human intervention. Distroprefs take care of them, see the distroprefs directory.

这篇关于非交互式运行Build.pl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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