Net::XMPP Connection Start

Mika Raento mikie at iki.fi
Tue Oct 3 15:57:38 UTC 2006


Matt Mankins wrote:
> Hello.
> 
> I am having some trouble with getting the perl module Net::XMPP::Client 
> to work with DJabberd.  Has anyone used this combo successfully?

No and yes. I encountered the same problem. The home-made XML parser
that is used by Net::XMPP is broken (as is error-checking in the client,
so it might not be the best option anyway). It misparses attributes
if there are both ' and " quoted attributes on the same element.

Try this:
--- Parser.pm   2006-10-03 16:32:38.663630700 +0300
+++ /usr/lib/perl5/site_perl/5.8/XML/Stream/Parser.pm   2006-10-03
16:24:50.262462000 +0300
@@ -383,7 +383,7 @@
              $ids = $id1;
              $id = "\'";
          }
-        if((($id2 < $id1) && ($id1 == -1)) || ($id2 != -1))
+        if((($id2 < $id1) && ($id2 != -1)) || ($id1 == -1))
          {
              $ids = $id2;
              $id = "\"";

	Mika



More information about the Djabberd mailing list