http://www.perlmonks.org?node_id=1006882

abualiga has asked for the wisdom of the Perl Monks concerning the following question:

Hi there,

I'm making my way through the new edition of Intermediate Perl and arrived at a point where I could benefit from your insight. When using module-starter to create a module with ExtUtils::Makemaker, it works just fine. However, when using Module::Build, I get a warning that MYMETA files could not be created. Module::Build version is 0.4003, Module::Starter version is 1.60, and I have tried this on a Mac OSX Lion with Perl5.12, and on a RHEL5 with Perl5.16. Below is the code and output.

many thanks

$ module-starter --mb --module=Animal --author="name" --email=email -- +verbose Created Animal Created Animal/lib Created Animal/lib/Animal.pm Created Animal/t Created Animal/t/pod-coverage.t Created Animal/t/pod.t Created Animal/t/manifest.t Created Animal/t/boilerplate.t Created Animal/t/00-load.t Created Animal/ignore.txt Created Animal/Build.PL Created Animal/Changes Created Animal/README Added to MANIFEST: Build.PL Added to MANIFEST: Changes Added to MANIFEST: ignore.txt Added to MANIFEST: lib/Animal.pm Added to MANIFEST: MANIFEST Added to MANIFEST: README Added to MANIFEST: t/00-load.t Added to MANIFEST: t/boilerplate.t Added to MANIFEST: t/manifest.t Added to MANIFEST: t/pod-coverage.t Added to MANIFEST: t/pod.t Created Animal/MANIFEST Created starter directories and files $ cd Animal/ $ perl Build.PL Could not get valid metadata. Error is: Invalid metadata structure. Er +rors: License 'Artistic_2_0' is invalid (license) [Validation: 1.4] at /usr/local/lib/perl5/site_perl/5.16.0/Module/Build/Base.pm line 45 +71. Could not create MYMETA files Creating new 'Build' script for 'Animal' version '0.01'

Replies are listed 'Best First'.
Re: Module::Build - could not create MYMETA files
by tobyink (Canon) on Dec 03, 2012 at 14:40 UTC

    Does your Build.PL contain a license of "Artistic_2_0"? If so, it should probably be "artistic_2" as per CPAN::Meta::Spec.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      It does contain "license => 'Artistic_2_0'", but I'm not understanding your second sentence. I have CPAN::Meta::Spec 2.120630, is there something I need to modify?

        You recognize Build.PL contains "Artistic_2_0", hooray, now replace that with "artistic_2" -- it should probably be means replace :)

Re: Module::Build - could not create MYMETA files
by Anonymous Monk on Dec 03, 2012 at 14:45 UTC

    Ignore it :)

    Install Software::License

    report bug upstream (should mention to install Software::License when unrecognized license )

      that seems to fix the problem (installing Software::License) -- which, btw seems the sane thing to do instead of modifying the same thing over and over, and i just had deja vu about this comment... did i do this already?