[Module-build-general] PATCH - package_versions() for Module::Info
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-03-30 23:20:11
|
Hi Mattia, Here's a patch, attached, that adds a package_version() method to Module::Info. It has the following documentation: =item B<package_versions> my $versions = $module->package_versions; my %versions = $module->package_versions; Returns a hash (or a reference to a hash in scalar context) whose keys are the packages contained in the module (these are the same as what's returned by C<packages_inside()>), and whose values are the versions of those packages. =cut I'd like to use this functionality for Module::Build, where we want to generate a listing of all the packages and versions contained in all .pm files in the distribution. This patch could probably be implemented in some more efficient way, but it does seem to work. Let me know if you have any questions, or if/when you incorporate it. Thanks. -Ken |