trad-ex has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I had messages from Perl 5.8.5 like "Can't locate object method "new" via package "IO::Select" ...
It occurred not always, but often.
Why?

Anyone knows that reason??..


P.S.
Our environment:
Linux 2.6.9-42.ELsmp
CentOS release 4.4 (Final)
Perl v5.8.5 built for i386-linux-thread-multi
$LWP::VERSION eq '5.808'
$IO::Socket eq '1.28'
$IO::Select eq '1.16'
  • Comment on LWP and IO::Socket often said to me, "Can't locate object method" ....

Replies are listed 'Best First'.
Re: LWP and IO::Socket often said to me, "Can't locate object method" ....
by jettero (Monsignor) on Oct 14, 2008 at 12:16 UTC
    You failed to use or require. If you feel this is not the case, please supply sources...

    -Paul

      Hi Paul,

      Thanks a lot for your response.
      I'll show you my source, for example:
      #!/usr/bin/perl package hoge::fuga::geho; use strict; use Time::HiRes; use File::Copy; use IO::Socket; ... (snip) ... my $sock = new IO::Socket::INET( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', ); ... (snip)
        This code doesn't mention IO::Select which is the package whose new method seems to be missing. Also, your title seems to mention LWP, but when using that you shouldn't need to ever build a socket directly. This whole thread is so mysterious.

        -Paul