Skip to content

Instantly share code, notes, and snippets.

@libitte
Last active December 23, 2015 14:09
Show Gist options
  • Select an option

  • Save libitte/6646594 to your computer and use it in GitHub Desktop.

Select an option

Save libitte/6646594 to your computer and use it in GitHub Desktop.
Invalid metadata structure と出て、 License 'artistic2' is invalid と言われたエラーの対処メモ

Module::Starter::PBP を使ってcpan形式モジュールを作成途中、 `perl Build.PLで下記のようなエラーを受けとった。

Could not get valid metadata. Error is: Invalid metadata structure. Errors: License 'artistic2' is invalid (license) [Validation: 1.4]
 at /Users/hachiya.nobuto/perl5/lib/perl5/Module/Build/Base.pm line 4589.

下記の修正を加え再度実行したところ、errorが解消された。

diff --git a/Build.PL b/Build.PL
index 880fede..5cdac0c 100644
--- a/Build.PL
+++ b/Build.PL
@@ -4,12 +4,14 @@ use Module::Build;

 my $builder = Module::Build->new(
     module_name         => 'ColorThief',
-    license             => 'artistic2',
+    license             => 'artistic_2',

clear

$ perl Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'ColorThief' version 'v0.0.3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment