#!/home/perl5262/bin/perl

use strict;
use warnings;

# $Id$

use LWP::UserAgent;
use CPAN::Config;

my $ua = LWP::UserAgent->new();

my $cpan = 'http://www.cpan.org';
if ($CPAN::Config->{'urllist'}->[1]) {
    $cpan = $CPAN::Config->{'urllist'}->[1];
}

my $response = $ua->get($cpan . '/modules/01modules.mtime.html');

my @list;

if ($response->is_success()) {
    foreach (split("\n", $response->decoded_content())) {
        if (m!href="../authors/id/./../(.*?/.*?)">!) {
            push @list, $1 . $/;
        }
    }
} else {
    die $response->status_line();
}

print reverse @list;