Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Get list of version for particular CPAN distribution ?

by vsespb (Hermit)
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:

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 (Hermit) 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
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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (22)
As of 2015-07-30 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls