Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by tobyink (Canon)
on Jul 21, 2012 at 09:33 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found