Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为Dist::Zilla Dist.ini中的发行版指定最低perl版本?_Perl_Version_Dist Zilla - Fatal编程技术网

如何为Dist::Zilla Dist.ini中的发行版指定最低perl版本?

如何为Dist::Zilla Dist.ini中的发行版指定最低perl版本?,perl,version,dist-zilla,Perl,Version,Dist Zilla,我正在使用我的发行版。从下一个版本开始,我想强制执行perl 5.10+(was 5.006)的最低要求,因为我使用的是命名捕获:-) 现在我已经把用到了5.010位于我的主模块顶部,这很好,但我想知道:有没有办法在dist.ini文件中指定最低的perl解释器版本 我当前的dist.ini是: name = Net-Prober version = 0.07 ... [Prereqs] Carp = 0 Data::Dumper = 0 Digest::MD5 = 0 IO::Sock

我正在使用我的发行版。从下一个版本开始,我想强制执行perl 5.10+(was 5.006)的最低要求,因为我使用的是命名捕获:-)

现在我已经把
用到了5.010位于我的主模块顶部,这很好,但我想知道:有没有办法在
dist.ini
文件中指定最低的perl解释器版本

我当前的
dist.ini
是:

name    = Net-Prober
version = 0.07
...

[Prereqs]
Carp = 0
Data::Dumper = 0
Digest::MD5 = 0
IO::Socket::INET = 0
IO::Socket::SSL = 0
IO::Socket::UNIX = 0
LWPx::ParanoidAgent = 0
Net::Ping = 2.34
Sys::Syslog = 0

[Prereqs / TestRequires]
Test::More = 0
LWP::Online = 0

...
我可以将
perl=5.010
添加到
[Prereq]
块吗

我可以将perl=5.010添加到[Prereq]块吗


是的,你可以。另外,还有一个插件可以自动检测所需的最低版本的perl。

Dist::Zilla似乎接受
perl=5.010
中的
[Prereq]
block AFAICS:)您可以使用
distmeta
函数向模块的元数据添加
MIN\u perl\u version=>'5.010'
指令。CPAN安装程序(任何相当新的版本)都会尊重它。[autoprerereqs]也会检测
使用5.010在任何模块中。尽管MinimumPerl插件(via)有点过时。。例如,它没有检测到5.14(可能还有5.12)或更高版本中引入的任何功能。@Ether:它确实检测到5.12中的功能(包括…运算符),但您是对的,它没有更新到5.14或更高版本。我相信亚当接受补丁;-)看起来NEILB同时采用了这个模块,所以它有了一些更新。