title: How can I get Perl's Jabber::SimpleSend to work with Gmail chat?
body: <p>I'm trying to write a simple Perl script to send an Instant Message.  Jabber seemed like it might be the most conducive protocol.  But the following script fails:</p>
  
  <pre><code>#!/usr/bin/env perl
  use Jabber::SimpleSend qw(send_jabber_message);
  send_jabber_message('me@gmail.com',
                      'CENSORED',
                      'you@gmail.com',
                      'subject test',
                      "body test");
  </code></pre>
  
  <p>It says:</p>
  
  <pre><code>Can't call method "can_read" on an undefined value at 
  /opt/local/lib/perl5/site_perl/5.8.9/XML/Stream.pm line 1421.
  </code></pre>
  
  <p>As cartman's answer points out, the code should actually be</p>
  
  <pre><code>#!/usr/bin/env perl
  use Jabber::SimpleSend qw(send_jabber_message);
  send_jabber_message('me%40gmail.com@talk.google.com',
                      'CENSORED',
                      'you%40gmail.com@talk.google.com',
                      'subject test',
                      "body test");
  </code></pre>
  
  <p>But that fails with the following error:</p>
  
  <pre><code>No SASL mechanism found
   at /usr/local/lib/perl5/site_perl/5.10.0/Authen/SASL.pm line 74
  </code></pre>
  
  <p>I do have the Authen::SASL cpan module installed.</p>