can't locate method new IO::Socket::INET



Sometimes, not always, an attempt to create a new socket connection
fails with this message:
Socket::INET" (perhaps you forgot to load "IO::Socket::INET"?) at
/usr/local/lib/perl5/5.6.1/IO/Socket/INET.pm line 32

Any ideas why or how INET.pm fails saying it can't find new in INET.pm?
The script runs on many servers many times a day, but only fails on one
and generally about the same time of the day. Okay. Seems kind of
obvious that is something specific to the server and the time of day.
But, within the same script there are multiple calls to create sockets
to different servers and they complete successfully.

I'm kind of out of my element on the internals of perl here, but my
thoughts:
Is it trying to find IO::Socket::INET.pm in @INC in order to identify
the super class, which is IO::Socket?
Does that mean that @INC has somehow become 'corrupted' during runtime?

any other thoughts.
Or has perl's symbol table become corrupted so it doesn't know what
"new" is?


nothing fancy in the script:

use IO::Socket;
use IO::Socket::INET;

$sock = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
);

for reference : in INET.pm:
@ISA = qw(IO::Socket);
....
sub new {
my $class = shift;
unshift(@_, "PeerAddr") if @_ == 1;
return $class->SUPER::new(@_); ### Here's line 32

}

.



Relevant Pages

  • Re: login script failing?
    ... How do you know whch servers are the users logging on? ... do not 'see' the login cmd box appear in the system tray area when I ... relevant servers but no matter what I put in the login script, ... and even h: fails occasionally. ...
    (microsoft.public.windows.server.active_directory)
  • 5.3-BETA7: /etc/rc.d/ntpdate not using "$ntpdate_flags" from rc.conf ?
    ... I wonder whether the script is wrong, ... If /etc/ntp.conf exists and has servers ... If all that fails, exit ntpdate without doing ...
    (freebsd-current)
  • Re: GetFolder over frame relay
    ... >I wrote a simple vb script to synchronize a directory on servers at our ... > everything works great but the process fails at all of the other sites. ... > Set oFolderFROM = oFSO.GetFolder'Code fails here. ... I think if I tell the script not ...
    (microsoft.public.scripting.vbscript)
  • Is There a File Size Limit for "Include"?
    ... I have a Php program made up of a small script "A.php" ... on dozens of web servers, but fails with no error message ...
    (comp.lang.php)
  • Re: javaldx failed.
    ... mozilla start from default fails, ... error message. ... console in the icewm window but I resolved this for the console window ... get script ...
    (Debian-User)