Posted on 2005-11-28 08:57:19-08 by tschloss
Error during Auth ??
Hi, I try to user the Jabber in an "ebaywatcher" programm (see www.perlmeister.com or http://www.linux-magazine.com/issue/39/Perl_Ebay_Auction_Monitoring.pdf). I receive always the following error: Usage: Authen::SASL::Cyrus::client_new(pkg, parent, service, host, ...) at /usr/lib/perl5/vendor_perl/5.8.6/Authen/SASL.pm line 63. (No other program output at all!) I am not sure, why "Cyrus" is used, but this may be correct. Any ideas? Version problems? Thx for hints!! Thomas
#!/usr/bin/perl ########################################### # part from : ebaywatch # Mike Schilli, 2003 (m@perlmeister.com) ########################################### use warnings; #use strict; our $JABBER_ID = "xxxxx"; our $JABBER_PASSWD = "pppppp"; our $JABBER_SERVER = "jabber.i-pobox.net"; our $JABBER_PORT = 5222; use Net::Jabber qw(Client); jabber_send("Test!!!"); ########################################### sub jabber_send { ########################################### my($message) = @_; my $c = Net::Jabber::Client->new(); $c->SetCallBacks(presence => sub {}); my $status = $c->Connect( hostname => $JABBER_SERVER, port => $JABBER_PORT, ); die "Can't connect: $!" unless defined $status; my @result = $c->AuthSend( username => $JABBER_ID, password => $JABBER_PASSWD, resource => 'ebaywatcher', ); die "Can't log in: $!" unless $result[0] eq "ok"; # $c->PresenceSend(); my $m = Net::Jabber::Message->new(); my $jid = "$JABBER_ID" . '@' . "$JABBER_SERVER/GAIM"; $m->SetBody($message); $m->SetTo($jid); DEBUG "Jabber to $jid: $message"; my $rc = $c->Send($m, 1); $c->Disconnect; }
Direct Responses: 1413 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.