Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

How are license keys of ExtUtils::MakeMaker and CPAN::Meta::Spec related?

by kcott (Archbishop)
on Mar 13, 2020 at 01:58 UTC ( [id://11114201]=perlquestion: print w/replies, xml ) Need Help??

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

I encountered an invalid license value (which I've redacted to XXX) when working with a legacy Makefile.PL which contained:

WriteMakefile( ... LICENSE => 'XXX', ... );

When I ran perl Makefile.PL, I got:

Invalid LICENSE value 'XXX'

I looked in the LICENSE section of ExtUtils::MakeMaker. That didn't provide any direct help but had a link to CPAN::Meta::Spec for more information. Looking in the license section of that document, I found examples showing values as arrayrefs, followed by a list of the only valid values. I changed Makefile.PL to:

LICENSE => ['restricted'],

Running perl Makefile.PL again, I now get:

WARNING: LICENSE takes a string/number not a ARRAY reference.

I thought it was a bit of a long shot but, as CPAN::Meta::Spec had consistently used lowercase license, I tried:

license => ['restricted'],

but that only got me

WARNING: license is not a known parameter.

Anyway, I found that

LICENSE => 'restricted',

generated no warning or error messages. I had several legacy modules to deal with and subsequently came across one with

LICENSE => 'unrestricted',

which also worked without any issues.

So, that solved my immediate problem.

However, I'm still a little baffled by the apparent contradiction of a single string versus an array of strings; especially as CPAN::Meta::Spec has in its DESCRIPTION:

"Distribution building tools like ... ExtUtils::MakeMaker ... should create a metadata file in accordance with this specification ..."

I don't see how ExtUtils::MakeMaker, which only allows a single license value, could create the multiple license values as described in CPAN::Meta::Spec.

I get the feeling that one or both of these modules has problematic documentation, or that I'm missing some other information which glues these two together.

Any enlightenment would be greatly appreciated.

— Ken

Replies are listed 'Best First'.
Re: How are license keys of ExtUtils::MakeMaker and CPAN::Meta::Spec related?
by Anonymous Monk on Mar 13, 2020 at 07:12 UTC

      ++ Many thanks for that information.

      I think META_ADD and META_MERGE fill the gaps to which I alluded with: "... I'm missing some other information which glues these two together."

      — Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11114201]
Approved by LanX
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 07:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found