Hi David On Mon, 2009-08-31 at 23:57 -0400, David Golden wrote: > 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'
Excellent. That's very neat. > 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 > -- Ron Savage r...@savage.net.au http://savage.net.au/index.html