opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi monks i get the following err
Invalid argument at C:/Perl/site/lib/Net/YMSG.pm line 351
when i try ro compile the following code
#!/usr/bin/perl -w use Net::YMSG; use strict; my $yahoo = Net::YMSG->new( pre_login_url => 'http://edit.my.yahoo.co.in/config/', hostname => 'cs.yahoo.co.in', ); $yahoo->id('someuser'); $yahoo->password('password'); $yahoo->login or die "Can't login Yahoo!Messenger"; $yahoo->send('recipient_yahoo_id', 'hi there!');
The problem is with this code in YMSG.pm
sub get_connection { my $self = shift; return $self->handle if $self->handle; my $server = IO::Socket::INET->new( PeerAddr => $self->{hostname}, PeerPort => $self->get_port, Proto => 'tcp', Timeout => 30, ) or die $!; $server->autoflush(1); return $self->handle($server); }
help required
thankyou opensourcer

Replies are listed 'Best First'.
Re: problem with Net::YMSG
by davidrw (Prior) on Apr 14, 2005 at 13:41 UTC
    Which line is 351? Just a guess based on what argument could be missing: Do you need to specify a port (maybe the $self->get_port fails)?