in reply to IO::Socket fails!!
The error originates from UNIVERSAL::VERSION, which is called as Socket->VERSION(1.3); by use Socket 1.3;
The error can be recreated by executing that line without first loading the module.
$ perl -e'Socket->VERSION(1.3)' Socket defines neither package nor VERSION--version check failed at -e + line 1.
The only explanation I can fathom (other than a bug) is that Perl thinks the module has been loaded when it hasn't.
$ perl -e'BEGIN { $INC{"Socket.pm"}=1; } use Socket 1.3' Socket defines neither package nor VERSION--version check failed at -e + line 1. BEGIN failed--compilation aborted at -e line 1.
Are you playing with %INC or using some kind of packager?
Even looking at it can vivify it in some circumstances.
$ perl -e'BEGIN { 1 for $INC{"Socket.pm"}; } use Socket 1.3' Socket defines neither package nor VERSION--version check failed at -e + line 1. BEGIN failed--compilation aborted at -e line 1.
What do you get if you place the following before use IO::Socket;
BEGIN { if (exists($INC{"Socket.pm"}) { if (defined($INC{"Socket.pm"}) { warn(">>> \"$INC{"Socket.pm"}\"\n"); } else { warn(">>> undef\n"); } } else { warn(">>> absent\n"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IO::Socket fails!!
by ikegami (Patriarch) on Oct 07, 2009 at 17:30 UTC |