Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Hanging program

by Anonymous Monk
on Apr 11, 2003 at 03:05 UTC ( [id://249793]=note: print w/replies, xml ) Need Help??


in reply to Re: Hanging program
in thread Hanging program

Program dies after "Information is being passed.". Does this help?
#!/usr/bin/perl use strict; use warnings; my $user = "wfgs343R"; my $pass = "iamcool"; my $aim; print "Subject's Name:"; chomp(my $destuser = <STDIN>); print "Message:"; chomp(my $message = <STDIN>); use Net::AOLIM; $aim = Net::AOLIM->new( 'username' => $user, 'password' => $pass, 'callback' => \&callbackfunction, 'server' => 'toc.oscar.aol.com', 'port' => 1234, 'allow_srv_settings' => 1, 'login_server' => 'login.oscar.aol.com', 'login_port' => 5198, 'login_timeout' => 0, 'aim_agent' => "$Net::AOLIM::VERSION"); print "Information is being passed.\n"; $aim->signon; print "Aim is signed on.\n"; $aim->toc_send_im($destuser, $message); print "Done\n";

Replies are listed 'Best First'.
Re: Re: Re: Hanging program
by krujos (Curate) on Apr 11, 2003 at 03:22 UTC
    You are missing () after $aim->signon I dont know if this makes a difference honestly. You should check the return value of signon, when I ran your code, (with my aim of course) the return value of signon was undef (which the docs say means it failed). According to the documentation there are some error messages you can get back (IM_ERR). Try printing those out.
    Also, it takes about thirty or forty seconds for the signon to fail, are you waiting long enough?
    Good luck,
    Josh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://249793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found