Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Finally, META.yml customization in MakeMaker

Journal written by schwern (1528) and posted by brian_d_foy on 2008.09.06 10:58   Printer-friendly

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 <schwern@pobox.com>
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • +1

    Nothing like a short-hair yak.

    -- dagolden

  • Doeas it also support optional_features and other recursive options

    requires:
      perl: 5.006
      Exporter: 0
      Carp: 0
      Data::Dumper: 0
    recommends:
      File::Temp: 0.14
      IO::Scalar: 0
    build_requires:
      perl: 5.006
      Test::Harness: 0
      Test::More: 0
    optional_features:
    - opt_csv:
      

    --
    Enjoy, have FUN! H.Merijn