Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: A command-line utility to list CPAN modules/dists?

by tobyink (Canon)
on Jul 21, 2012 at 09:33 UTC ( #982962=note: print w/replies, xml ) Need Help??


in reply to A command-line utility to list CPAN modules/dists?

The MetaCPAN API should make something like that pretty easy.

Here's a list of modules from the distribution name...

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

... I leave the reverse as an exercise for the reader.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: A command-line utility to list CPAN modules/dists?

Replies are listed 'Best First'.
Re^2: A command-line utility to list CPAN modules/dists?
by sedusedan (Monk) on Jul 25, 2012 at 07:03 UTC

    Thanks! Scriptified:

    https://github.com/sharyanto/scripts/blob/master/cpanmod2dist
    https://github.com/sharyanto/scripts/blob/master/cpandist2mod

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://982962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2022-11-27 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?