in reply to Re: Listing dependencies for Perl modules--should even the common ones get listed?
in thread Listing dependencies for Perl modules--should even the common ones get listed?

I list author-only stuff under `develop.requires`. A snippet from GraphQL's Makefile.PL:
WriteMakefile( NAME => 'GraphQL', # ... META_MERGE => { "meta-spec" => { version => 2 }, dynamic_config => 0, resources => { x_IRC => 'irc://irc.perl.org/#graphql-perl', repository => { type => 'git', url => 'git@github.com:graphql-perl/graphql-perl.git', web => 'https://github.com/graphql-perl/graphql-perl', }, bugtracker => { web => 'https://github.com/graphql-perl/graphql-perl/issues', }, license => [ 'http://dev.perl.org/licenses/' ], }, prereqs => { develop => { requires => { 'Test::Pod::Coverage' => '1.08', 'Test::Pod' => '1.22', 'Pod::Markdown' => 0, }, }, runtime => { suggests => { 'Cpanel::JSON::XS' => '3.0237', 'JSON::XS' => 0, }, }, }, }, );
That lets me minimise or avoid specifying them separately in continuous integration (CI) config.
  • Comment on Re^2: Listing dependencies for Perl modules--should even the common ones get listed?
  • Download Code

Replies are listed 'Best First'.
Re^3: Listing dependencies for Perl modules--should even the common ones get listed?
by kcott (Archbishop) on Apr 06, 2025 at 02:46 UTC

    G'day etj,

    That's a far more complicated Makefile.PL than I currently write; however, I can see some distinct benefits to using it.

    I found ExtUtils::MakeMaker - META_MERGE which has some limited information. It doesn't mention {prereqs}{develop}{requires} or {prereqs}{runtime}{suggests}; I suspect there may be others.

    Can you point me to a definitive reference for the META_MERGE key? Thankyou.

    — Ken

        G'day hippo,

        ++ for the reference; and thanks again to etj for the original idea.

        This definitely seems like a better idea than splitting dependencies across Makefile.PL and README files. As well as my own personal modules, I maintain templates for these files for $work: I'll look at integrating META_MERGE during the next maintenance iteration.

        — Ken