On Mon, Aug 31, 2009 at 10:00 PM, Ron Savage<r...@savage.net.au> wrote:
> I want to ensure all files in the dir return the same version number, if
> I print them using version.pm.

Assuming your *.pm files are in Module::Build distros...

perl -MModule::Build -E '$mb=Module::Build->new_from_context; $pkgs =
$mb->find_dist_packages; say "$_ => $pkgs->{$_}{version}" for keys
%$pkgs'

Obviously, you can analyze $pkgs directly rather than just printing
it.  This is what generates the 'provides' data in META.yml, which is
what PAUSE uses for indexing, if it exists.  It has the nice property
of ignoring 'no_index'.

So, while not perfect in the context of version number complexity,
it's a pragmatic approach to deal with your question.

-- David

Reply via email to