hello_world has asked for the wisdom of the Perl Monks concerning the following question:
what am i doing wrong here ? $user is undef !!#!/usr/bin/perl use Net::XMPP; use Data::Dumper; my $username = ''; my $password = ''; my $resource = 'Perl'; my $hostname = 'talk.google.com'; my $port = 5222; my $componentname = 'gmail.com'; my $connectiontype = 'tcpip'; my $tls = 1; # Connect to Google Talk my $Connection = new Net::XMPP::Client(); my $stat = $Connection->Connect( hostname => $hostname, port => $port, tls => $tls, componentname => $componentname, connectiontype => $connectiontype, ) or die "Failed:$!\n";; my @res = $Connection->AuthSend( username => $username, password => $password, resource => $resource ) or die "Failed to Auth +:$!\n"; $Connection->PresenceSend(show=>'available'); my $roster = $Connection->Roster(); my @buddies = $Connection->RosterGet(); my $user = $roster->online('somebuddy@gmail.com'); print "Roster - @buddiesn"; print "User - $user\n"; while (my $x=$Connection->Process()) { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting gtalk user status using Net XMPP
by Anonymous Monk on Feb 26, 2012 at 10:34 UTC | |
by hello_world (Acolyte) on Feb 26, 2012 at 10:47 UTC | |
by Anonymous Monk on Feb 26, 2012 at 11:05 UTC |