Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Get list of version for particular CPAN distribution ?

by vsespb (Chaplain)
on Jan 08, 2013 at 21:29 UTC ( [id://1012341]=perlquestion: print w/replies, xml ) Need Help??

vsespb has asked for the wisdom of the Perl Monks concerning the following question:

Hello.

I need to get list (programmatically, via API) of all versions of a particular CPAN module.

For example for MIME-Base64 it is 3.13 3.11 3.10 3.09 3.08.

Is there a way to do it without parsing HTML ?

There are a lot of CPAN APIs, but seems none of them provide list of older versions.

  • Comment on Get list of version for particular CPAN distribution ?

Replies are listed 'Best First'.
Re: Get list of version for particular CPAN distribution ?
by vsespb (Chaplain) on Jan 08, 2013 at 22:09 UTC
    Seems I found a solution
    use BackPAN::Index; my $backpan = BackPAN::Index->new; my $dist = $backpan->dist("MIME-Base64"); my $releases = $dist->releases; print join "\n", map { $_->version } $releases->all;
    it uses BackPAN however (i.e. includes obsolete versions). But for me it's not a major problem.
      Props for finding the solution to your own question! :-P
      A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found