Finally, META.yml customization in MakeMaker

schwern on 2008-09-06T10:16:36

In a fit of wild yak shaving, I finally adapted Adriano Ferreira's patch to allow customization of the META.yml file in MakeMaker so I can add "resources" to Test::More. Now you can pass in data structures via META_ADD or META_MERGE to, respectively, add/override or merge META.yml values.

For example, MakeMaker itself does this.

    META_MERGE      => {
        no_index => {
            package => ['DynaLoader'],
        },
        resources => {
            license     =>      'http://dev.perl.org/licenses/',
            homepage    =>      'http://makemaker.org',
            bugtracker  =>      'http://rt.cpan.org/NoAuthBugs.html?Dist=ExtUtils-MakeMaker',
            repository  =>      'http://svn.schwern.org/svn/CPAN/ExtUtils-MakeMaker',
            'MailingList' =>    'makemaker@perl.org',
        },
    },


I also brought the default META.yml up to the 1.4 spec, added in a default no_index for t/ and inc/ and a configure_requires on MakeMaker itself filling in long unspoken assumptions.

Here's what MakeMaker's META.yml looks like now:

--- #YAML:1.0
name:               ExtUtils-MakeMaker
version:            6.44
abstract:           Create a module Makefile
author:
    - Michael G Schwern 
license:            perl
distribution_type:  module
configure_requires:
    ExtUtils::MakeMaker:  0
requires:
    DirHandle:       0
    File::Basename:  0
    File::Spec:      0.8
    Pod::Man:        0
resources:
    bugtracker:   http://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-MakeMaker
    homepage:     http://makemaker.org
    license:      http://dev.perl.org/licenses/
    MailingList:  makemaker@perl.org
    repository:   http://svn.schwern.org/svn/CPAN/ExtUtils-MakeMaker
no_index:
    directory:
        - t
        - inc
    package:
        - DynaLoader
generated_by:       ExtUtils::MakeMaker version 6.44
meta-spec:
    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
    version:  1.4