#!/usr/bin/perl
use strict;
use warnings;

use Data::Dumper;

use XMLRPC::Lite;

my $username = "hoge";
my $password = "fuga";
my $blogid   = "2";
my $proxyurl = 'http://hoop.euqset.org/blog/mt-xmlrpc.cgi';
my $appkey   = "anything"; # the value of this is not important, it's just an ID for your script

#
# uncomment one of the call lines
#
my $res = XMLRPC::Lite
   -> proxy($proxyurl)
   ## -> call('blogger.getUsersBlogs', $appkey, $username, $password)
   ## -> call('blogger.getRecentPosts', $appkey, $blogid, $username, $password, 4 )
   -> call('metaWeblog.getRecentPosts', $blogid, $username, $password, 4)
   -> result;

if (defined ($res))
{
   print "--success--\n";
   print Dumper ($res);
}
else
{
   print "failed: $!";
}
