Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify a minimum perl version for my distribution in Dist::Zilla dist.ini?

I'm working on my Net::Prober distribution, using dzil. From the next version I'd like to enforce a minimum requirement of perl 5.10+ (was 5.006), because I'm using named captures :-)

Now I have put use 5.010; at the top of my main module, and that's fine, but I was wondering: is there a way to specify a minimum perl interpreter version in the dist.ini file?

My current dist.ini is:

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

...

Can I just add perl = 5.010 to the [Prereq] block?

like image 543
Cosimo Avatar asked Jul 20 '12 07:07

Cosimo


1 Answers

Can I just add perl = 5.010 to the [Prereq] block?

Yes, you can. Alternatively, there's the MinimumPerl plugin that autodetects the minimal version of perl that's required.

like image 93
Leon Timmermans Avatar answered Sep 20 '22 17:09

Leon Timmermans