>>>>> On Wed, 22 Nov 2006 08:52:35 +0000, Sendu Bala <[EMAIL PROTECTED]> said:
> Andreas J. Koenig wrote: >>>>>>> On Tue, 21 Nov 2006 15:22:38 +0000, Sendu Bala <[EMAIL PROTECTED]> >>>>>>> said: >> >> > Does CPAN support and make use of the things you can include in v1.3 >> > (current) of the META spec? >> >> Only "requires" and "build_requires" >> >> > http://module-build.sourceforge.net/META-spec-v1.3.html >> >> > Specifically, does it do anything useful when it comes across >> > 'recommends' syntax like: >> >> > recommends: >> > Data::Dumper: 0 >> > File::Find: 1.03 >> >> I expect that other tools deal with recommendations and that after the >> user has made his choices the recommendations are merged with requires >> and/or build_requires. > At what point in the process could another such tool act like that? As > far as I can see, CPAN unpacks the tar ball, checks META.yml for > 'requires' and 'build_requires' And usually discards it because it is not authoritative. > then immediately runs Build.PL, by > which time it is too late for another tool to do anything with the > META.yml file, or 'merge' in some other way? If it is MakeMaker, it writes the PREREQ_PM stuff into the Makefile and CPAN.pm then reads it. If it is Module::Build, it determines "requires" and "build_requires". We have not made a final agreement how CPAN.pm gets the information out of Module::Build. Ken suggested and my current repository version does it: to read and eval _build/prereqs which is around after Build.PL has run. Many CPAN.pm versions out there currently run $req = Module::Build->current->requires(); $breq = Module::Build->current->build_requires(); Older ones just trusted the META.yml blindly. The Module::Build support in CPAN is still a bit young, sorry. > How would you suggest a tool achieve these ends? Any way I look at it, > it must be CPAN that processes the META.yml file before running > Build.PL, which means it must be CPAN that handles the 'recommends' or > at least CPAN that calls some other tool to modify META.yml before > CPAN looks at it in the normal way. I hope when CPAN.pm 1.89 is out that this is settled. Module::Build has its own mailing list, so there you would hear about the future directions. It's very quiet over there at the moment, but I don't think it's stalled. -- andreas