Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Get list of version for particular CPAN distribution ?

by vsespb (Chaplain)
on Jan 08, 2013 at 21:29 UTC ( #1012341=perlquestion: print w/replies, xml ) Need Help??
vsespb has asked for the wisdom of the Perl Monks concerning the following question:


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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1012341]
Approved by ww
[GotToBTru]: but then .. if you have nothing to say, why not say nothing?
[MidLifeXis]: I have a user who has a lot of say on how some of our processes work that abhors significant blanks. Perhaps that is a part of it. A not-so-obvious "this space intentionally left blank" indicator.
[MidLifeXis]: On the back end, however, that doesn't mean that i have to use that value to indicate "undefined", no matter how much he thinks I should.

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-01-20 19:16 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (176 votes). Check out past polls.