On Sat, Mar 16, 2002 at 12:10:39PM +0000, Stephen Allsopp wrote: > On Fri, 15 Mar 2002 14:36:31 -0700 > Nicholas Perez <[EMAIL PROTECTED]> wrote: > > > You know you could talk directly with the developer who's code is in > > question instead of asking a large selection of people that might not > > have even looked at Net::Jabber :) Just a thought ;) > > Gunjan, I don't think it's the Net::Jabber code that's at fault here. What it sounds >like is that you've given the Send the wrong type of argument. When I set up presence >(this is based on examples from the book), I create a Net::Jabber::Presence object, >fill it appropriately, and pass it to $connection->Send() (not PresenceSend). It >works for me. >
It's a 'wrong type of argument' problem, but not with Send(); in this case it's with the new() method of Net::Jabber::Presence() - called in the handle_presence() callback in the script. As Piers, and the nj10021.html article, has already mentioned, what is happening is that Net::Jabber is now sending two values to the callbacks - the first being a session ID, the second being the one that we really want to pass to the new() method. Pre-1.0021, it just sent the latter value. > Also, be aware of a few things in Programming Jabber: for one, it's got *lots* of >typos and errata. I haven't found anything yet that affects me in the code examples, >but there is always the possibility that something has gone amiss. I suggest you >check the Errata page for the book on the O'Reilly website. Also, as you have already >pointed out, the Net::Jabber libs are a moving target, as is Jabber itself, to some >extent. > Stephen - I try to check the Errata page regularly, but please don't hesitate to bug me by email ([EMAIL PROTECTED]) with anything you find and want to ask about or thwap me over the head about :-) Cheers dj _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
