note
tobyink
<p>The <a href="https://metacpan.org/">MetaCPAN API</a> should make something like that pretty easy.</p>
<p>Here's a list of modules from the distribution name...</p>
<tt>perl -MLWP::Simple -MJSON -MURI::Escape -E'my $data = from_json get sprintf "http://api.metacpan.org/v0/module/_search?q=distribution:%s+AND+module.indexed:true+AND+status:latest&fields=release,path,module&size=4999", uri_escape shift; say for map { sprintf "%s %s", $_->{name}, $_->{version} } map { @{$_->{fields}{module}} } @{$data->{hits}{hits}}' Moose</tt>
<p>... I leave the reverse as an exercise for the reader.</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-757127">
<small><small>
<tt>perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
</tt></small></small>
</div></div>
982944
982944