Automating Freshmeat submissions

chorny on 2009-01-02T13:42:33

Reading about low number of Perl project announces on Freshmeat, I also thought about automating this. Freshmeat has XML-RPC interface for submitting new releases of existing Freshmeat projects. It requires Freshmeat login/pass, project id, branch name (list of them can be fetched using 'fetch_branch_list' method) - can be filled automatically if only one exists, new version, changes (string, no HTML, character limit 600 chars), release focus (number) and different URLs. Some of this fields are missing in CPAN distibutions, so they need to be stored somewhere.

CPAN has 2 modules for XML-RPC: XML::RPC and RPC::XML. RPC::XML hangs on Windows, so I tried XML::RPC. XML::RPC had no tests, and thus failed installation, so I wrote very simple tests and new version was already released.

Example that fetches list of licenses from Freshmeat: use XML::RPC;

my $xmlrpc = XML::RPC->new('http://freshmeat.net/xmlrpc/'); my $result = $xmlrpc->call( 'fetch_available_licenses', {} );

print join("\n",@$result);


Another CPAN module is WWW::Freshmeat. It can only fetch project description. It has only load test, so I added a real one.