Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
executable file 43 lines (30 sloc) 813 Bytes
#!/usr/bin/env perl
# Fetch the most recent module releases and save out as JSON
use strict;
use warnings;
use local::lib;
use File::Temp;
use XML::RSS;
use JSON;
use LWP::Simple qw(mirror RC_OK);
use File::Path qw(mkpath);
mkpath 'data', 0755 unless -e 'data';
{ out => 'data/recent.json',
url => "",
sub process_rss {
my $conf = shift;
my $local = $conf->{out} . ".rss";
return unless mirror($conf->{url}, $local) == RC_OK;
my $rss = XML::RSS->new;
$rss->parsefile( $local );
my $items = $rss->{'items'};
my $j = JSON->new();
my $json_file = $conf->{out};
open my $fh, ">:utf8", $json_file
or die "Could not open $json_file: $!";
print $fh $j->encode($items);
close $fh;
Jump to Line
Something went wrong with that request. Please try again.