<xdg> [13:49:31] Is there a [Test::MaxPerl] plugin yet? If not I might write one today.
<kentnl> [14:14:47] Wait. What would that do? Tell you "this code is broken on 5.x and above" ? and how does that work in the dependencies?
<xdg> [14:39:09] kentnl, I was thinking "detect if I inadvertently did something past some max perl I want"
<kentnl> [14:40:21] Ah, right, so I think it would be smart to put "limit" somewhere in the terminology or people might get confused
<kentnl> [14:42:22] or Set or something like that.
<haarg> [15:11:22] there's Test::MinimumVersion and a dzil plugin using it
<xdg> haarg, awesome! rjbs already wrote what I want
<xdg> except the dzil plugin doesn't do what I want. :-(
<haarg> yeah, the plugin looked a bit wonky
<xdg> plugin gets minimum from yaml, which I autogenerate, so it actually doesn't help me
<xdg> mike, could you fix [Test::MinimumVersion] to take an argument? I'd like to be able to say [Test::MinimumVersion]\nperl = 5.010 and be explicit it about that
<haarg> could you just declare the perl version you want as a prereq?
<mike> Shouldn't that be a 'use' line in the code?
<xdg> mike, opposite problem.
<xdg> I use [MinimumPerl] to set perl= XXX automatically from code. I want to have a test to make sure I didn't accidentally use something higher than I want.
<mike> oh. OH! I like this idea
<xdg> Your plugin gets the version from meta, which doesn't help
* mike opens the code
<mike> Yeah, shouldn't be hard
By setting the version yourself, you can know if you accidentally increased the minimum version of perl required. This is actually probably the only way to make the plugin useful, since if you automatically determine the minimum perl version required, and put it in META.yml, then the test is only verifying that the scan gives the same version when the test runs. Instead, you want to have a static target version, and have your code scanned to see if it's above that.
Add max_target_perl to control the maximum minimum perl that's OK
Fixes GH #1, reported by xdg++