How many of your dists are in Debian?

Here's a small script which I whipped up just now. I thought of trying out MetaCPAN::API, but after about 5 minutes of trying to find a way to list an author's distributions (and failed), I resorted to a quick hack using Mojo::DOM.

Here's a sample output:

$ list-cpan-dists-that-have-debian-packages adamk
Algorithm-Dependency
Archive-Zip
Aspect
CPAN-Inject
CPANDB
CSS-Tiny
Class-Adapter
Class-Autouse
Class-Default
Class-Handle
Class-Inspector
Config-Tiny
Crypt-DSA
Data-JavaScript-Anon
Devel-Dumpvar
File-Find-Rule-Perl
File-Find-Rule-VCS
File-Flat
File-HomeDir
File-LocalizeNewlines
File-Remove
File-ShareDir
File-UserConfig
File-Which
HTTP-Lite
Image-Math-Constrain
LWP-Online
List-MoreUtils
Method-Alias
Module-Extract
Module-Inspector
Module-Install
Module-Manifest
Module-Math-Depends
ORLite
ORLite-Migrate
ORLite-Mirror
ORLite-Statistics
Object-Destroyer
Object-Signature
Object-Tiny
PPI
PPI-HTML
PPI-XS
Params-Coerce
Params-Util
Perl-MinimumVersion
Pod-Tests
SMS-Send
Task-Weaken
Template-Plugin-Cycle
Template-Tiny
Test-ClassAPI
Test-Inline
Test-NeedsDisplay
Test-NoWarnings
Test-Object
Test-Script
Test-SubCalls
Text-Balanced
URI-ToDisk
Validate-Net
YAML-Tiny
asa
prefork

Sadly as I suspected, none of my modules are in Debian yet :)

I also wrote another similarly-ego-search-motivated script some moons ago.

6 Comments

It's pretty easy to get a list of an author's distributions from the MetaCPAN API and then plug that into JSON.pm.

Any chance of a version of your script which queries the Debian website instead of apt-cache? It would be nice to be able to run it on non-Debian boxes.

The trade-off is that you tie up the server to the tune of a 1250 KB download, whereas the individual queries return around 9 KB each, one 140th as much. For an author with a dozen distributions, the individual queries are clearly better, even for several dozen; north of 70 or so, the big download is clearly better. Exactly where the break-even point for networking vs database lies depends on the p.d.o infrastructure…

I've modified Steven's script to include version numbers in the output - both the latest release on CPAN, and the latest on Debian, so you can see how far (if at all) Debian is behind.

https://gist.github.com/2999516

Leave a comment

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays). My CPAN ID: SHARYANTO. I'm sedusedan on perlmonks. My twitter is stevenharyanto (but I don't tweet much). Follow me on github: sharyanto.