Link to public version control system (GitHub or otherwise)

You might know one of my pet peeves is to get people to link to the public version control system of their CPAN modules. Earlier I created a few reports, and in the last couple of days I have started to check the most recent modules again.


When I find a module that does not have a link from its META files to its VCS, I try to locate if there is a public VCS at all, if there is one on GitHub, I send a pull request. If I cannot find a public VCS I check with the author if there is one elsewhere or if s/he prefers to keep the VCS private. I am happy to let you know that most people reacted positively to these pull-requests and questions.

Once they merge the pull request I usually mention that the MetaCPAN dashboard lists all of their modules that have no link to VCS (or no entry for license) in their META files.

The most recent numbers produced by the script I am using to locate modules without a link to a VCS show that among the 1,000 most recently uploaded distributions, 205 (20%) did not have a link to a public VCS. Out of this number 46 were distributions were by people who do not have public VCS or just do not want to link to it. The remaining 159 are the potential pool of distributions that might get a link added.

Based on this, either the situation has dramatically improved since May 2014, the last time I checked or, the method I am using now has a different bug than the one I used generating the earlier reports.

BTW If I look at the 5,000 most recently uploaded releases then the total number of missing repo-links is 1,567 (31%) out of which 124 belonged to people who don't have public VCS and 1,443 to people who might have public VCS.

7 Comments

The MetaCPAN dashboard thingy is buggy though. Mine shows dozens of distributions that it claims have no link to version control. An example is LV. This quite clearly includes a version control link in META.json and META.yml, which is clearly recognized by MetaCPAN because it shows up in the side panel on the left hand side of this page.

The reason for the dramatic improvement you see may be a "CPAN Day" blip. Looking at the last 2000 uploads (as of now), 16% of them were uploaded by just one person - a person who happens to be quite consistent at including repository details with his releases.

META.json allows two main fields for the repository - a URI for a web link, and also a VCS-specific string which often looks something like a URI. (There's a third field for the repo type - "git", "svn", "hg", etc.)

META.yml has a single field, so if there's no META.json, MetaCPAN probably has to guess what type of link it's looking at.

So I suppose what type of repository link you get is dependent on whether your distribution includes META.json, META.yml, or both. And if META.json, which of the two repository fields is populated.

Thanks for the reminder. It looks like two modules I updated for CPAN day aren't showing up because I forgot to add the meta-spec entry. I made sure I added the repository, but it seems without that it just tosses everything but the homepage.

Leave a comment

About Gábor Szabó - גאבור סבו

user-pic I blog about Perl.