I'm trying to post to Blogger with Perl. I realize there's Net::Blogger, but it doesn't support post titles. I understand that XML::Atom can be used, but this code always results in a 500 error from the server. It seems to authenticate me fine because I can put an incorrect password in there and I get a different error. It seems there are others having the same problem, so I thought I'd ask my fellow monk.
use XML::Atom::Client; use XML::Atom::Entry; use XML::Atom::Person; use strict; my $api = XML::Atom::Client->new; $api->use_soap(0); $api->username("username"); $api->password("password"); my $entry = XML::Atom::Entry->new; $entry->title("Testing Blogger via Perl"); $entry->content("Did it work?"); my $author = XML::Atom::Person->new; $author->name("Dave"); $author->email("email\@gmail.com"); $entry->author($author); $api->createEntry("https://www.blogger.com/atom/<blogid>", $entry) or +warn $api->errstr;

In reply to Posting to Blogger with XML::Atom by davemabe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.