The CPAN file 02packages.details.txt.gz only has the mapping of distribution <-> module only for the latest version of a module.
In fact, the "r" command in the cpan shell tells you which distribution file you have to download to obtain the latest version, but cpan nevers tells you from which distribution file you obtained the current version of the module. I think that data is not saved anywhere.
Anybody knows how to (programatically) obtain the distribution file from which a given module (a specific version) was installed?