Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Hanging program

by Anonymous Monk
on Apr 11, 2003 at 03:05 UTC ( #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";


Comment on Re: Re: Hanging program
Download Code
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
Node Status?
node history
Node Type: note [id://249793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-08-21 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (144 votes), past polls