I've been using XMLRPC::Lite when remote posting to my fleet of wordpress blogs,
but I don't like anything about it:
I mean, REALLY, does this look like normal code?
my $self = {
server => XMLRPC::Lite->proxy( $post_url ),
username => $user,
password => $pass
};
eval {
my $call = $self->{ server }->call(
'metaWeblog.newPost',
1, # blogid, ignored
$self->{ username },
$self->{ password }, {
title => $title,
description => $description,
categories => [('Uncategorized')],
mt_allow_comments => '0',
mt_allow_pings => '0',
mt_tb_ping_urls => '0',
mt_keywords => [@tags],
},
1 # publish
);
It took me two days to figure out how to send the tags: [@tags] a reference to list or someshit.

XMLRPC::Lite comes with a feature that abruptly ends all code execution
on certain errors; called fatal, I have no idea why any programmer in his
right mind would build in such a thing. Why not send a warning and let the
coder utilizing the module do as he wishes?
Anyway,I had to learn to use perls eval function to trap those errors. This took
time from my nap schedule, but now I just get a warning and my code continues.
However, there is the matter of the response which the remote server sends back
to my program. It's in some sort of data structure that no one can access without
using ANOTHER MODULE called Data::Dumper, which translates the data being held
hostage inside XMLRPC::Lite into a friendly text string.
However, Data::Dumper took me more time to learn (and only partially learn), and
sent me scurrying around the web for docs.
Geeesus!
So, I would like to just send my xml to xmlrpc.php with a simple POST and I have
got that working like this:
$xml_string =<<here;
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param>
<value><int>1</int></value>
</param>
<param>
<value><string>$user</string></value>
</param>
<param>
<value><string>$pass</string></value>
</param>
TRIMMED...
But, the body of my post contains left angle brackets (for links) which are not allowed in XML format.
"Any characters are allowed in a string except < and &, which are encoded
as < and &. A string can be used to encode binary data."
-
http://www.xmlrpc.com/specOk, I can encode those, np, but Wordpress displays them as literal <, not as part of the HTML source code.
I also tried < but no go.
Has anyone got into this shit other than me?
Bompa