CPAN::Releases::Latest - find latest release(s) of all dists on CPAN, including dev releases
use CPAN::Releases::Latest; my $latest = CPAN::Releases::Latest->new(max_age => '1 day'); my $iterator = $latest->release_iterator(); while (my $release = $iterator->next_release) { printf "%s path=%s time=%d size=%d\n", $release->distname, $release->path, $release->timestamp, $release->size; }
VERY MUCH AN ALPHA. ALL THINGS MAY CHANGE.
This module uses the MetaCPAN API to construct a list of all dists on CPAN. The generated index is cached locally. It will let you iterate across these, returning the latest release of the dist. If the latest release is a developer release, then you'll first get back the non-developer release (if there is one), and then you'll get back the developer release.
When you instantiate this class, you can specify the max_age of the generated index. You can specify the age using any of the expressions supported by Time::Duration::Parse:
max_age
5 minutes 1 hour and 30 minutes 2d 3600
If no units are given, it will be interpreted as a number of seconds. The default for max age is 1 day.
If you already have a cached copy of the index, and it is less than the specified age, then we'll use your cached copy and not even check with MetaCPAN.
CPAN::ReleaseHistory provides a similar iterator, but for all releases ever made to CPAN, even those that are no longer on CPAN.
BackPAN::Index is another way to get information about all releases ever made to CPAN.
https://github.com/neilbowers/CPAN-Releases-Latest
Neil Bowers <neilb@cpan.org>
This software is copyright (c) 2014 by Neil Bowers <neilb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install CPAN::Releases::Latest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Releases::Latest
CPAN shell
perl -MCPAN -e shell install CPAN::Releases::Latest
For more information on module installation, please visit the detailed CPAN module installation guide.