CPAN-ReleaseHistory
view release on metacpan or search on metacpan
bin/cpan-release-history view on Meta::CPAN
#!/usr/local/bin/perl
#
# cpan-release-history - show all releases of a given distribution
#
use strict;
use warnings;
use CPAN::ReleaseHistory;
use Text::Table::Tiny 1.00 qw/ generate_table /;
die "usage $0 <dist-name>\n" unless @ARGV == 1;
my $iterator = CPAN::ReleaseHistory->new()
->release_iterator(well_formed => 1);
my @entries;
while (my $release = $iterator->next_release) {
# The convention is that any Raku releases go in a Perl6 directory
# Let's guess that a directory Raku will be supported soon as well
next if $release->path =~ m!/Perl6/!;
next if $release->path =~ m!/Raku/!;
my $distinfo = $release->distinfo;
my @tm = gmtime($release->timestamp);
next unless $distinfo->dist eq $ARGV[0];
unshift(@entries,
[
$distinfo->version,
sprintf("%d-%.2d-%.2d", $tm[5] + 1900, $tm[4] + 1, $tm[3]),
$distinfo->cpanid,
]
);
}
print generate_table(rows => \@entries,
top_and_tail => 1, include_header => 1,
style => 'norule', align => 'left'), "\n";
exit 0;
=head1 NAME
cpan-release-history - show all releases of a distribution
=head1 SYNOPSIS
cpan-release-history String-Parity
1.34 2015-11-06 NEILB
1.33 2015-10-25 NEILB
1.32 2014-03-28 NEILB
1.31 1996-12-11 WINKO
=head1 DESCRIPTION
This script displays all I<releases> of a given CPAN I<distribution>,
in reverse chronological order.
The information displayed is:
=over 4
=item *
The version of the release.
=item *
The date of the release.
=item *
The PAUSE id of the CPAN author who uploaded the release.
=back
=head1 SEE ALSO
L<CPAN::ReleaseHistory> is the module used to get the information.
( run in 0.963 second using v1.01-cache-2.11-cpan-aadc1410aed )