|
According to CPANTS as recorded in my mail to the module-authors mailing list back on 24 March 2008 there were 9,920 distributions without a license field in their META.yml (or without a META.yml). Today I checked CPANTS again and there are 10,235 such distributions. I'd rather see this number shrinking than growing and it is very simple to do that. You just have to go to each one of your modules and update their Makefile.PL or Build.PL. Next time you release them they will already include the license field. I don't want to tell you what license to use, just to use one and declare it in META.yml as well. AFAIK most users should let their toolchain create the META.yml file during packaging. So I'll show how you can let it add this field automatically. I'll use the most common perl license in my examples: ExtUtils::MakeMaker If you are using ExtUtils::MakeMaker add the following to your Makefile.PL:
'LICENSE' => 'perl',
or if you want to make sure older versions won't give warnings on unknown LICENSE field you can use the following code:
($ExtUtils::MakeMaker::VERSION >= 6.3002 ?
('LICENSE' => 'perl', ) : ()),
(FYI even the version distributed with perl 5.8.8 is 6.30 and thus it does not yet contain this feature. The best if you could upgrade ExtUtils::MakeMaker). Module::Build If you are using Module::Build add the following to Build.PL:
license => 'perl',
Module::Install If you are using Module::Install add the following to Makefile.PL:
license 'perl';
The most up to date version of the META.yml specification points to the Module::Build::API for the current list of valid options for this field. Why? Just for those who really want an explanation why is that field important or useful: If we have the license field in the META.yml file it will be easy for anyone to check that all the modules used in an application are actually using licenses that are compatible with each other and the requirements of the application. You personally might not care much about this, but is such a little work and it is a huge help to all the other people and other forms of organizations who do care. See also my previous notes: Missing licenses on CPAN modules? and License of Perl Modules on CPAN |