#!/home/stro/perl/perl5122/bin/perl use strict; use warnings; # $Id$ use LWP; use CPAN::Config; use YAML; my $ua = LWP::UserAgent->new(); my $cpan = 'http://www.cpan.org'; if ($CPAN::Config->{'urllist'}->[0]) { $cpan = $CPAN::Config->{'urllist'}->[0]; } my $response = $ua->get($cpan . '/authors/RECENT-1d.yaml'); my (@list, @dev); if ($response->is_success()) { my ($hashref, $arrayref, $string) = Load($response->decoded_content()); foreach my $upl (sort { $a->{'epoch'} <=> $b->{'epoch'} } @{ $hashref->{'recent'} }) { next unless $upl->{'type'} eq 'new'; my $path = $upl->{'path'}; next if $path =~ /CHECKSUMS$/; next if $path =~ /\.meta$/; next if $path =~ /\.readme$/; if ($path =~ m!^id/./../(.*)$!) { $path = $1; if ($path =~ /\d_\d/) { push @dev, $path . $/; } else { push @list, $path . $/; } } } } else { die $response->status_line(); } print @list; print STDERR @dev;