From: Vincent Pit Date: Tue, 6 Aug 2013 04:08:38 +0000 (-0300) Subject: Teach the update script to skip outdated dev releases X-Git-Tag: v0.05~12 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=f51455893abebac960943d1fabffcf009bfed681;p=perl%2Fmodules%2Fre-engine-Hooks.git Teach the update script to skip outdated dev releases --- diff --git a/src/update.pl b/src/update.pl index 63d3bff..b5eae47 100644 --- a/src/update.pl +++ b/src/update.pl @@ -96,8 +96,22 @@ sub key_version { "$int$frac" => [ $num_version, $pretty_version ]; } +my $latest_dev_rev = 19; + +sub perl_is_supported { + my $v = "$_[0]"; + + return unless $v >= '5.010001'; + + if ($v =~ /^5\.([0-9]{2}[13579])/) { + return $1 >= $latest_dev_rev; + } + + return 1; +} + my %perls = map key_version($_), - grep "$_" >= '5.010001', + grep perl_is_supported($_), keys %Module::CoreList::released; {