Re: [Module-build-general] More version info in META.yml
Status: Beta
Brought to you by:
kwilliams
|
From: <and...@an...> - 2003-03-31 05:14:05
|
>>>>> On Sun, 30 Mar 2003 15:20:03 -0600, Ken Williams <ke...@ma...> said: > 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. Right, it finds only one VERSION per file, but does so for any .pm file you're interested in. > 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. Indeed I correct you: PAUSE took the middle way and in all the years only about 3 people complained: find N package statements in all *.pm files but only one VERSION statement per file. You get an M:N matrix of package name and version numbers, take the max of available version numbers per package. Very trivial and effective. Note that this was defined to be the correct way, even if thinge like package Foo::Bar; $VERSION=42; package Foo::Bar::Baz; $VERSION=123; could surprise somebody who had the weird idea to write such a version hell. We ruled out quite a lot of weird ideas that way. So if you replace PAUSE's heavy weaponry in PAUSE::pmfile::parse_version with plain MakeMaker->parse_version, you're done. -- andreas |