Re: [Module-build-general] More version info in META.yml
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-03-30 21:20:22
|
On Sunday, March 30, 2003, at 03:03 PM, Andreas J. Koenig wrote: >> Since this is a pretty hard and dangerous task, > > See, it's not dangerous per se, it's only dangerous on PAUSE. The > META.yml file will only be generated on the developer's own box, so > there's no need to protect from that sort of malicious code. Very good point. >> maybe we ought to really get it right and have it in a module. >> Could we try to use Module::Info for this? Even if Module::Info >> doesn't work correctly, maybe the best thing to do would be to fix >> Module::Info. > > I believe that MakeMaker's parse_version does a pretty good job and > Module::Info claims to follow MakeMaker's lead. I think MakeMaker is doing an easier and smaller task - just figuring out the version of the "chief" module in the distribution. So it only looks for the first line in the chief .pm file that looks like it contains a $VERSION. By contrast, to create the index of all modules & versions in the distribution, we have to find all 'package' declarations (which Module::Info does a nice job at), and all $VERSIONs within those packages (which it doesn't do yet). Correct me if I'm wrong in my understanding, of course. I'm going to look at Module::Info and try to add a package_version() method or something to it if it's not too terribly hard. -Ken |