Digital Ocean, one of my favorite VPS providers is running its Hacktoberfest again. The goal is to encourage more people to contribute to Open Source projects.

In a nutshell: After you register on their website you need to send 4 pull-requests to any GitHub hosted project in October. The first 50,000 people get a cool T-shirt.

How?

The Hacktoberfest page has some explanation on how to contribute, but if you'd like a deeper explanation, you can pick up my eBook on Collaborative Development using Git and GitHub

What?

So what can you do if you care about Perl?

MetaCPAN provides a lot of information about CPAN modules, but not all the modules provide this information. I have written a small script using MetaCPAN::Client to fetch the N most recently uploaded modules and check some of these meta data.

The script is here:

examples/recent_cpan_modules.pl

use strict;
use warnings;
use 5.010;

use Data::Dumper qw(Dumper);
use MetaCPAN::Client;

main();
exit();

sub main {
    my $mcpan  = MetaCPAN::Client->new();

    my ($count) = @ARGV;
    $count //= 10;
    my $recent = $mcpan->recent($count);      # https://metacpan.org/pod/MetaCPAN::Client::ResultSet

    my %seen;
    #say $recent->total;
    while (my $this = $recent->next) {
        #say $this;      # https://metacpan.org/pod/MetaCPAN::Client::Release
        #say $this->name;
        #say $this->distribution;
        #say $this->author;
        #say $this->date;
        #say $this->version;
        #say $this->version_numified;
        #say Dumper $this->license;
        #say Dumper $this->metadata;
        #say '---------------';

        # check only the mosy recent upload of a distribution
        next if $seen{ $this->distribution };
        $seen{ $this->distribution } = 1;

        my @issues;

        my $license = $this->license;
        if (not @$license) {
            push @issues, "Missing license in META files";
        }
        if (@$license == 1 and $license->[0] eq 'unknown') {
            push @issues, "License in META files is unknown";
        }
        push @issues, check_meta($this->metadata);

       if (@issues) {
            printf qq{<a href="%s">%s</a><br>\n}, $this->metacpan_url, $this->name;
            for my $issue (@issues) {
                say qq{$issue<br>\n};
            }
            say qq{<p>\n};
       }
    }
}

sub check_meta {
    my ($meta) = @_;

    return "Missing resources from META files" if not exists $meta->{resources};
    return "Missing repository from META files" if not exists $meta->{resources}{repository};
    #return "No repository type" if not exists $meta->{resources}{repository}{type};
    #return Dumper $meta->{resources}{repository};
    return
}

You can download it and run it yourself to see the most up to date information. You can also improve the script and send a PR with the improvement. The source of the script is here.

Currently it checks if the META files contains a link to the source repository of the module and if it has a license in the META files.

Link to repository

If the META file does not contain information about the source code repository then you'll have to do a little research to find out if the modules is on GitHub at all.

One way is to look at the name of the author. Look at other modules of the same author. If none of them have links to a "Repository" (on the left side of the MetaCPAN page) then that person probably does not have a version control or not on Git. You can send an e-mail to the person asking about it or you can move on to something else.

If you found that some other modules have the "Repository" link then using that link you can find the module authors username on GitHub. It is likely that the source of the module in question is under the same user.

If still cannot find the repository, then send the author an e-mail. S/he might reply quickly and then you can make progress with it.

Once you know the repository of the module you can follow this article on adding repository link to a CPAN distribution.

License

If the report generated by the script shows that the META file of the module does not contain a license, or if the license is "unknown", then check out this article that explains how to add the license field to the META.yml and META.json files on CPAN. This assumes that you already know where is the source repository of the module.

Travis-CI

I have not implemented this yet, but this is the next thing on my agenda. For the modules that use GitHub and that have links to their GitHub repository, check if they have a .travis.yml file. If not, then for sure they don't use Travis-CI for Continuous Integration. In such case first you need to make sure there are tests in the module and that you can run them on your computer. If there are no tests, add any simple test-case. Once there is at least one test, you can create a .travis.yml, enable Travis-CI for your clone and once the tests are passing on Travis-CI as well you can send a pull-request with that file and the information needed to enable Travis-CI.

On 30 September 2019 I ran the script on the 1,000 most recently uploaded modules and this is what I got.

Business-CreditCard-0.38
Missing resources from META files

Audio-Nama-1.216
License in META files is unknown

Missing resources from META files

DateTime-Ordinal-0.01
Missing resources from META files

devtools-0.02
License in META files is unknown

Missing resources from META files

IO-Pager-0.43
License in META files is unknown

Missing resources from META files

Net-DRI-0.96_13
Missing repository from META files

Bundle-Maintainer-MHASCH-0.002
Missing resources from META files

Mojolicious-Command-scaffold-0.0.2
License in META files is unknown

Missing resources from META files

Tangle-0.01
License in META files is unknown

Missing resources from META files

AnyEvent-WebDriver-1.01
License in META files is unknown

Missing resources from META files

Text-Capitalize-1.5
Missing repository from META files

Google-Ads-AdWords-Client-5.8.2
Missing repository from META files

SUNAT-0.01
License in META files is unknown

Missing resources from META files

IO-Async-Loop-Mojo-0.06
Missing repository from META files

AsposeCellsCloud-CellsApi-19.9
License in META files is unknown

Missing resources from META files

Date-Time2fmtstr-1.03
Missing resources from META files

MooX-Role-CliOptions-0.05
Missing resources from META files

Lemonldap-NG-Portal-2.0.6
Missing repository from META files

Lemonldap-NG-Manager-2.0.6
Missing repository from META files

Lemonldap-NG-Handler-2.0.6
Missing repository from META files

Bioinfo-0.1.15
Missing resources from META files

XAO-Indexer-1.05
License in META files is unknown

XAO-ImageCache-1.22
License in META files is unknown

Missing resources from META files

XAO-Catalogs-1.04
License in META files is unknown

Missing resources from META files

XAO-Content-1.06
License in META files is unknown

Missing resources from META files

API-INSEE-Sirene-3.504
Missing resources from META files

Dancer2-Plugin-WebService-4.1.8
Missing resources from META files

POE-Component-FunctionBus-0.02
Missing resources from META files

Net-Graphite-0.18
License in META files is unknown

Missing resources from META files

Tie-TZ-10
Missing repository from META files

Gtk2-Ex-MenuView-5
Missing repository from META files

Math-OEIS-13
Missing repository from META files

Getopt-O2-v1.1.0
Missing repository from META files

Sim-OPT-0.463
License in META files is unknown

Missing resources from META files

WebService-Hexonet-Connector-v2.2.4
Missing resources from META files

PGObject-Util-DBMethod-1.00.003
Missing resources from META files

PGObject-Util-DBChange-0.050.3
Missing resources from META files

Telugu-Itrans-0.03
License in META files is unknown

Missing resources from META files

Fsdb-2.68
Missing resources from META files

mojo-console-0.0.7
License in META files is unknown

Missing resources from META files

Job-Async-Redis-0.004
Missing resources from META files

StreamFinder-1.21
Missing resources from META files

Net-Clacks-6.1
License in META files is unknown

Missing resources from META files

AnyEvent-7.17
License in META files is unknown

Missing resources from META files

App-perlsh-0.02
Missing repository from META files

Data-SeaBASS-0.192600
Missing resources from META files

Parallel-Forker-1.250
License in META files is unknown

Missing resources from META files

IO-HyCon-0.2
Missing resources from META files

Locale-Maketext-Gettext-1.30
Missing resources from META files

Crypt-IDA-0.03
License in META files is unknown

Missing resources from META files

Date-Holidays-DE-2.03
License in META files is unknown

Missing resources from META files

WWW-Search-Ebay-3.054
Missing repository from META files

AnyEvent-Fork-RPC-2.0
License in META files is unknown

Missing resources from META files

Siffra-Tools-0.15
Missing resources from META files

WARC-v0.0.0_6
Missing resources from META files

Text-Starfish-1.29
License in META files is unknown

Missing resources from META files

AnyEvent-ZabbixSender-1.1
License in META files is unknown

Missing resources from META files

DateTime-Format-Flexible-0.32
Missing resources from META files

Finance-Bank-LaPoste-9.02
License in META files is unknown

Missing resources from META files

Bio-Palantir-0.192560
Missing resources from META files

Math-FastGF2-0.07
License in META files is unknown

Missing resources from META files

XS-Install-1.2.11
License in META files is unknown

Missing resources from META files

Net-SNMP-Mixin-InetCidrRouteTable-0.03
Missing repository from META files

Verilog-Perl-3.468
Missing repository from META files

mojo-debugbar-0.0.3
License in META files is unknown

Missing resources from META files

mojo-events-0.0.2
License in META files is unknown

Missing resources from META files

Mojolicious-Plugin-Events-0.3.3
License in META files is unknown

Missing resources from META files

Image-Sane-4
License in META files is unknown

Missing resources from META files

Math-Polynomial-1.015
Missing resources from META files

Time-OlsonTZ-Data-0.201903
Missing repository from META files

HC-HyCon-0.1
Missing resources from META files

AnyEvent-YACurl-0.13
License in META files is unknown

Missing resources from META files

AWS-CDK-0.001_01
Missing resources from META files

JSII-0.001_01
Missing resources from META files

Device-Chip-CC1101-0.02
Missing repository from META files

Dita-GB-Standard-20190911
Missing repository from META files

MARC-File-JSON-0.005
Missing resources from META files

Win32-SqlServer-2.012
License in META files is unknown

Missing resources from META files

Dita-GB-Standard-Types-20190911
Missing repository from META files

Code-Quality-0.002
Missing repository from META files

WebService-HIBP-0.15
Missing resources from META files

Graphics-Framebuffer-6.35
License in META files is unknown

Missing resources from META files

IO-Termios-0.08
Missing repository from META files

Telugu-Utils-0.03
License in META files is unknown

Missing resources from META files

Mojolicious-Plugin-Debugbar-0.0.2
License in META files is unknown

Missing resources from META files

Test-Module-Runnable-0.4.2
License in META files is unknown

Missing resources from META files

Future-AsyncAwait-0.33
Missing repository from META files

Data-Bitfield-0.04
Missing repository from META files

Device-Chip-HTU21D-0.04
Missing repository from META files

Device-Chip-AnalogConverters-0.08
Missing repository from META files

Data-Douglas_Peucker-0.01
License in META files is unknown

Missing resources from META files

Syntax-Keyword-Try-0.11
Missing repository from META files

Data-Edit-Xml-20190906
Missing repository from META files

GrabzItClient.3.3.6
License in META files is unknown

Missing resources from META files

Test-Expr-0.000009
Missing resources from META files

Dist-Banshee-0.002
Missing resources from META files

Firefox-Marionette-0.82
Missing resources from META files

Proc-ProcessTable-piddler-0.2.0
License in META files is unknown

Missing resources from META files

Forks-Queue-0.12
Missing resources from META files

IO-IPFinder-1.0
Missing resources from META files

Net-Connection-ncnetstat-0.5.0
License in META files is unknown

Missing resources from META files

Task-Biodiverse-NoGUI-3.001
License in META files is unknown

Task-Biodiverse-3.00
License in META files is unknown

App-ccdiff-0.28
Missing repository from META files

Geoffrey-Changelog-Database-0.000202
License in META files is unknown

Unicode-EastAsianWidth-12.0
License in META files is unknown

Pod-PseudoPod-0.19
Missing repository from META files

grpc-xs-0.32
License in META files is unknown

Missing resources from META files

Getopt-OO-v1.0.19
Missing resources from META files

libgetopt-oo-perl-v1.0.19
Missing resources from META files

AI-ML-0.001
Missing resources from META files

Math-Polynomial-Horner-4
Missing repository from META files

math-image-113
Missing repository from META files

Glib-Ex-ConnectProperties-20
Missing repository from META files

HTML-T5-0.006
Missing repository from META files

Syntax-Keyword-Dynamically-0.01_001
Missing repository from META files

Algorithm-Cluster-1.59
License in META files is unknown

Missing resources from META files

Mojo-UserAgent-Cached-1.07
Missing repository from META files

Script-Toolbox-0.63
License in META files is unknown

Missing resources from META files

Number-ZipCode-JP-0.20190830
Missing repository from META files

Net-DNS-1.21
Missing resources from META files

Devel-PerlySense-0.0221
Missing resources from META files

Mojolicious-Command-static-0.02
License in META files is unknown