in reply to Here's the offending line of code, HTH
in thread ActiveState's PerlApp is causing an odd problem with IO:Socket
The problem is that the statement
my $sel = new IO::Select $sock;
uses indirect object syntax. Directly above is the require statement:
require IO::Select;
With a non-overridden require, it will create the IO::Select package at compile time and the statement above is compiled as
my $sel = IO::Select->new($sock);
Without the compiletime definition of the IO::Select package, Perl compiles it as
my $sel = new($sock->IO::Select());
because the IO::Socket module had already defined a new() sub at this time.
Another "fix" would be to add a
use IO::Select;
line to the top of your script.
|
|---|