David Golden wrote:
It's your responsibility to include META.yml.
ExtUtils::MakeMaker will generate it for you since EU::MM 6.46 or so.

Thanks for the clarification. Testing just now, it seems 'make dist' puts META.yml in the tarball.


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.

Thanks for the confirmation.


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.

Okay:

    http://module-build.sourceforge.net/META-spec-current.html

Does 'configure_requires' support map to a Perl version?


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.
...
Recent ExtUtils::MakeMaker supports BUILD_REQUIRES, with the same
caveats as CONFIGURE_REQUIRES.

STFW, it looks like BUILD_REQUIRES and CONFIGURE_REQUIRES are supported as of Perl 5.10.1:

    http://perldoc.perl.org/5.10.1/ExtUtils/MakeMaker.html


C.f. 
http://www.dagolden.com/index.php/1173/what-tools-should-you-use-to-create-a-cpan-distribution/

Thanks -- I read that recently. But I missed the citation to "Writing Perl Modules for CPAN":

    http://www.amazon.com/dp/159059018X/ref=cm_sw_su_dp

Should I get this book, or is there a newer/ better resource?


I extended ExtUtils::MakeMaker so that I could:

    make all:
        -- run pod2text against main module and put that into README.
        -- run pod2html against listed files and put that into HTML
           files.

    make mcpani
        -- run mcpani and inject tarball into my CPAN Mini Mirror

    make release
        -- copy tarball and *.html files to file server

If I wanted to migrate this functionality to a newer tool, how well suited would Module::Install, Module::Builder, and Dist::Zilla be?


And, what about backwards compatibility to earlier Perl versions?


David

Reply via email to