17.4% of CPAN uploads have no license in the META files

I just checked the 1000 most recent CPAN uploads and 174 of them did not have a license.That's 17.4%.

According to the history of the metayml_has_license metric of CPANTS, there has been a constant improvement since 2003, but I feel it is still too high.
Especially if you take in account how easy it is to add license to the META files.

What about making a New Year's resolution to add the license key to each one of your modules?

7 Comments

Your post raises the question why one should add a license to a module?

That question raises another question :) Why wouldn't you specify what the users of your software can/cannot do with your software? That's what the license essentially is.

You specify the license so that potential users know whether they can use your software or not. Many people won't touch software where it's not explicitly licensed in a way that they prefer to use.

I would also point out that some upstream repackagers of CPAN distributions can be picky over the how the license is presented. I've been contacted once or twice by debian maintainers asking me to fix some parts of my license and copyright information. In that case my module was a dependency of a module they were packaging, so even if you think your stuff is small you never know the long tail effect and one bad license in the dependency chain can bring the whole thing down.

Its easy to add this, so not sure why you'd not. I just assume people don't because there is still too much black art to preparing stuff for CPAN (a whole different issue, really) and people just cargo cult stuff that seems to work.

I noticed that CPANTS doesn't have a check for LICENSE (like it does for README etc) -- getting that check in would likely improve things.

e.g. I just noticed that some of my uploads (of dists I'm comainting for others, that use older packaging mechanisms like Module::Install or vanilla EUMM) don't contain a LICENSE, but since I look at my kwalitee ratings, this is something I'd notice and fix in subsequent releases if there was a metric for it.

By the way, Gabor, your instructions at http://perl5maven.com/how-to-add-the-license-field-to-meta-files-on-cpan aren't quite right for Module::Install:

- 'all_from' can be used instead of 'license', as long as there is a LICENSE section in the .pm file;
- Makefile.PL *must also* do 'auto_lieense;' (via Module::Install::AutoLicense) to actually generate the file - the 'license' directive merely adds an entry to the metadata but doesn't generate the LICENSE file.

> I noticed that CPANTS doesn't have a check for LICENSE

I was wrong - it's here:

http://cpants.cpanauthors.org/kwalitee/has_humanreadable_license

Leave a comment

About Gabor Szabo

user-pic Perl author and trainer. Usually writing on other sites: Writing the Perl 5 Maven tutorial Perl 6 articles. Started a Perl IDE. Running the Weekly Perl newsletter. My personal blog.