develooper Front page | | Postings from March 2011

Module::Build in build_requires

Thread Next
David E. Wheeler
March 7, 2011 10:34
Module::Build in build_requires
Message ID:

For some time, I've been using this pattern in my Build.PL:

    configure_requires => { 'Module::Build' => '0.30' },
    create_makefile_pl => 'traditional',
    build_requires     => { 'Module::Build' => '0.30' },

However, while the build with Build.PL requires Module::Build, the build with the generated Makefile.PL does not. However, Module::Build::Compat puts anything found in build_requires into PREREQ_PM. So folks who are building my modules with Makefile.PL are having to satisfy that dependency even though it's not required. Peter Scott (Cc'd) emailed me about this last week, pointing out that it's a silly requirement for, for example, RPM packagers.

So what steps should I take for this, since configure_requires isn't supported in older Perls? The options, as I see them, are:

1. Omit Module::Build from build_requires and hope that configure_requires takes care of most cases. That seems dubious.

2. Tweak Module::Build::Compat to omit Module::Build from PREREQ_PM  when it's only in build_requires, on the assumption that it isn't actually needed for the build. This sometimes won't be true, in some small number of cases, I expect.

3. Give up on Module::Build::Compat and start maintaining Makefile.PL myself. I know a lot of folks are using dzil for this, but I haven't made that jump yet and have a *lot* of modules that I'd have to convert over (not an RJBS number of modules, mind you, but still pretty significant).

My thought is that if #3 really is the best choice, then it might be time to actually deprecate M::B::Compat.



Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About