[JDEV] Perl Headline Delivery script Error?
Stephen Allsopp
stevea at castle-systems.co.uk
Sat Mar 16 06:10:39 CST 2002
On Fri, 15 Mar 2002 14:36:31 -0700
Nicholas Perez <NicholasRPerez at yahoo.com> 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.
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.
But I'd be inclined to suspect my own code first :-)
> On Sat, 16 Mar 2002 02:46:43 +0530, "Gunjan Kakani" <gunjan09 at yahoo.com>
> wrote: Hi,
>
> I was experimenting with the Perl Headline Delivery script written by DJ
> Adams, from "Fun with Jabber" articles.
>
> But the script when executed gives error as following...
>
> "Can't use string("3C924DDA") as a HASH ref while "strict refs" in use
> at /usr/lib/perl5/...../Jabber.pm line 588."
>
> I checked with the changes made in the Net::Jabber module since this
> script was written, but those changes could not solve this problem,
> since this problem occures in sending the presence at
> $Connection->PresenceSend() method. If I uncomment this method and
> produce the log, its working perfect, just that is is not sending
> messages to subscribers, since they dont know the presence of the
> headline deliverer.
>
> Anyone, has any ideas of this problem???
>
> Thanks
>
> -Cheers
>
> -GC
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
--
Stephen Allsopp stevea at castle-systems.co.uk
End of message reached. For your comfort and convenience, we recommend
that you stop reading now.
More information about the JDev
mailing list