http://www.perlmonks.org?node_id=1012341

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.