Collecting my attempts to improve at tech, art, and life

How many recent authors on CPAN?

Tags: perl gist

Sorry, I couldn’t fit this in a tweet.

Yanick’s concerned about Perl’s CPAN.

{{< tweet user=“yenzie” id=“1254874808774516738” >}}

So I grabbed the authors of the last 5,000 releases and counted authors, using Mojolicious and the MetaCPAN API.

$ export MCP_LATEST='https://fastapi.metacpan.org/v1/release/_search?q=status:latest&fields=author&sort=date:desc&size=5000'
$ http $MCP_LATEST > _search.json
$ perl -Mojo -E 'say c(j(f("_search.json")->slurp)->{hits}{hits}->@*)->map( sub { $_->{fields}->{author} } )->uniq->size . " authors made the last 5000 releases"'
974 authors made the last 5000 releases

Downloaded the file with httPie because I felt bad hammering MetaCPAN with -Mojo g() while sorting out the rest of the “one-liner.”

I have no idea if these results are good or bad, but I half-expected less than 100 authors.

Getting useful information like spread of release dates is left as an exercise for the reader.


Got a comment? A question? More of a comment than a question?

Talk to me about this page on: mastodon

Added to vault 2024-01-15. Updated on 2024-01-26