From: sprout Date: Thu, 28 Jan 2010 06:37:49 +0000 (-0800) Subject: Solve the version problem once and for all by applying the version number X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d6254a5a974b8477cd6c325f956dc30d4c77e58;p=dbsrgits%2FDBM-Deep.git Solve the version problem once and for all by applying the version number to every module in META.yml, under the ‘provides’ key. --- diff --git a/Build.PL b/Build.PL index acd11e4..3f769a1 100644 --- a/Build.PL +++ b/Build.PL @@ -1,8 +1,18 @@ -use Module::Build; +use Module::Build 0.28; # prepare_metadata use strict; -my $build = Module::Build->new( +my $build = Module::Build->subclass( + class => 'Any::Thing', + code => ' + sub prepare_metadata { + my $node = shift->SUPER::prepare_metadata(@_); + my $ver = $node->{version}; + $_->{version} = $ver for values %{$node->{provides}}; + $node; + } + ', +)->new( module_name => 'DBM::Deep', license => 'perl', requires => {