NAME

CPAN::Releases::Latest - find latest release(s) of all dists on CPAN, including dev releases

SYNOPSIS

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;
}

DESCRIPTION

VERY MUCH AN ALPHA. ALL THINGS MAY CHANGE.

This module uses the MetaCPAN API to construct a list of all dists on CPAN. 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, which is cached locally. You can specify the age using any of the expressions supported by Time::Duration::Parse:

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.

SEE ALSO

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.

REPOSITORY

https://github.com/neilbowers/CPAN-Releases-Latest

AUTHOR

Neil Bowers <neilb@cpan.org>

COPYRIGHT AND LICENSE

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.