Net::OSCAR and do_one_loop question



Curious if anyone here has any experience with Net::OSCAR.

Below is the simple sample code from the docs (minus my actual
screenname and password). What I added in the while(1) loop was a
simple print ".". This was so I could see that I was truly looping
infinitely, and turns out I wasn't.

After a while I never comeback from do_one_loop until there was an
event (such as an incoming IM). Then it would loop a few times, and
back to being stuck in the do_one_loop.

Which is really no good as I need my app to do other things. I also
tried the sample code OSCAR which is included in the download off of
CPAN, it uses IO::Poll. But the same thing happened. After a while it
would not come back, unless there was some type of IM event.

Anyone have any experience with this, or perhaps know where I can ask?

Many thanks.

P.S. For what it's worth, I promise I am not trying to create some
annoying AIM bot. This is really for alert purposes.

#!/usr/bin/perl -w
use strict;

use Net::OSCAR qw(:standard);

sub im_in {
my($oscar, $sender, $message, $is_away) = @_;
print "[AWAY] " if $is_away;
print "$sender: $message\n";
}

my $oscar = Net::OSCAR->new();
$oscar->set_callback_im_in(\&im_in);

$oscar->signon($screenname , $password);

while(1) {
$oscar->do_one_loop();
print ".";
}

.



Relevant Pages

  • Re: Writing Excel cells within Access
    ... Some sample code that may get you started (you can add loops to this code to ... loop through each worksheet in a book if you'd like). ... EXCEL workbook and reads data from it and writes the data into a recordset. ... "Bob Bonta" wrote in message ...
    (microsoft.public.access.modulesdaovba)
  • Re: Can .FindNext return Nothing??
    ... You're definitely underpaid ... >I think that it won't wraparound to the first cell. ... The sample code is looking ... >Loop While Not c Is Nothing And c.Address FirstAddress ...
    (microsoft.public.excel.programming)
  • Re: Newbie: FOR loop on dates
    ... Sample code: ... Private Sub Form_Load ... Dim d As Date ... I want to loop through all dates between ...
    (microsoft.public.vb.general.discussion)
  • Re: for what are for/while else clauses
    ... > So in some sample code: ... But we expect that from a while loop. ... most Python statements pass control to the next statement ...
    (comp.lang.python)
  • Re: Iterate before loop end
    ... >> Here's my sample code. ... >choices, like moving the common processing to a separate procedure, or adding ... restart any loop from anywhere inside that loop. ... I could also restart any of the outer loops as well. ...
    (microsoft.public.vb.general.discussion)