On Tue, Jul 12, 2011 at 5:20 PM, Gabor Szabo <szab...@gmail.com> wrote: > As I could not find and answer I wonder if there is a well defined tool > for this in any of the packaging tools of Perl? > > If not, what is the recommended way to say in Makefile.PL and/or Build.PL: > > I don't require Module::Name version 2.7 but I'd work much > faster/better/cleaner if I had it. > Shall I install it?
The "official" way to list these dependencies is defined in the CPAN::Meta::Spec (cf http://goo.gl/paQGy ) The only distribution creation tool that can create metadata consistent with the full spec (that I'm aware of) is Dist::Zilla. See Dist::Zilla::Plugin::Prereqs, but it works like this in your dist.ini: [Prereqs / RuntimeRecommends] Foo::Bar = 1.23 [Prereqs / TestRecommends] Test::Differences = 0.61 Module::Build offer more limited capabilities to set Runtime/Recommends modules using 'recommends' (as previously mentioned). I believe with ExtUtils::MakeMaker you would have to manually set extra META fields. (I don't recall whether Module::Install gives you any sugar for it.) Unfortunately, I don't think any of the CPAN *clients* do anything yet with recommendations of this sort. The tools for creating more expressive prerequisites just made it into Perl 5, Version 14 and my personal goal is to get support into CPAN.pm in time for Perl 5, Version 16. -- David