On Fri, Dec 10, 2010 at 5:03 PM, David Christensen
<[email protected]> wrote:
> I don't produce a meta.yml in my distributions. It's my understanding that
> the CPAN indexer does that for me after I upload a distribution tarball.
It does not. It's your responsibility to include META.yml.
ExtUtils::MakeMaker will generate it for you since EU::MM 6.46 or so.
> It's my understand that PREREQ_PM is for specifying external modules needed
> once the distribution has been installed and is put into operation.
Correct. If you need modules available to *run* the Makefile.PL,
those need to be included as "configure_requires" in the META file and
recent CPAN/PLUS/minus will ensure they are available before running
Makefile.PL. You can conditionally add them as arguments to EU::MM
like so:
use ExtUtils::MakeMaker;
my %WriteMakeFileArgs = (
# ... normal stuff here
CONFIGURE_REQUIRES => {
'Some::Prereq' => 1.23,
},
);
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
That will let you add it to configure_requires in META when you build
the distribution, but not breaks things for end-users trying to
install your modules.
>> Sounds like they should be in build_requires, not requires.
>
> That sounds like Module::Build stuff:
>
> http://perldoc.perl.org/5.10.0/Module/Build/Compat.html
Recent ExtUtils::MakeMaker supports BUILD_REQUIRES, with the same
caveats as CONFIGURE_REQUIRES.
> I've been using ExtUtils::MakeMaker for years and it has met my simple
> single-module distribution needs. But as I attempt to extend the tool and
> use the extended tool for sets of distributions, the going is getting tough.
> I'm wondering if I should upgrade, and to what -- Module::Install,
> Module::Build, or Dist::Zilla?
C.f.
http://www.dagolden.com/index.php/1173/what-tools-should-you-use-to-create-a-cpan-distribution/
Regards,
David Golden