Subject: | latest_distribution doesn't always return the latest one. |
Hi. Version comparison in the "_ensure_latest_distribution" method does
nothing and the first distribution found in the
02packages.details.txt.gz is considered the latest. Below is the patch.
diff -ur Parse-CPAN-Packages-2.26/lib/Parse/CPAN/Packages.pm Parse-CPAN-
Packages-2.26-patched/lib/Parse/CPAN/Packages.pm
--- Parse-CPAN-Packages-2.26/lib/Parse/CPAN/Packages.pm 2006-06-14
15:34:14.000000000 +0900
+++ Parse-CPAN-Packages-2.26-patched/lib/Parse/CPAN/Packages.pm 2007-
12-01 00:17:47.203125000 +0900
@@ -148,7 +148,7 @@
my ( $av, $bv );
eval {
$av = version->new( $a->version || 0 );
- $bv = version->new( $a->version || 0 );
+ $bv = version->new( $b->version || 0 );
};
if ( $av && $bv ) {
if ( $av > $bv ) {