On Tue, Oct 19, 2010 at 8:49 AM, Johannes Kilian <jo.kil...@gmx.de> wrote:
> I'm trying to pack an executable on a Windows system - deep inside my
> code a dependent module uses socket.pm.
>
> Packing my sourcecode using pp I get an executable. Starting this
> executable, I got the following error message:
>
> "Can't locate loadable object for module Socket ..."

The module's name is actually Socket.pm (not the uppercase S).
Usually you'll get away with "use socket;" because of Windows' case insensitive
filesystem. But not in this case (note that a packed executable is also
a zip file, you can just run unzip etc on it):

pp -o hello1.exe -e "use socket;"
unzip -l hello1.exe  | grep -i sock
   8401  19.10.10 10:17   lib/IO/Socket.pm
   7495  19.10.10 10:17   lib/IO/Socket/INET.pm
   1413  19.10.10 10:17   lib/IO/Socket/UNIX.pm
  24064  06.05.10 16:40   lib/auto/socket/Socket.dll
   3765  19.10.10 10:17   lib/socket.pm

pp -o hello2.exe -e "use Socket;"
unzip -l hello2.exe  | grep -i sock
   8401  19.10.10 10:18   lib/IO/Socket.pm
   7495  19.10.10 10:18   lib/IO/Socket/INET.pm
   1413  19.10.10 10:18   lib/IO/Socket/UNIX.pm
   3765  19.10.10 10:18   lib/Socket.pm
  24064  06.05.10 16:40   lib/auto/Socket/Socket.dll

Running hello1.exe shows your symptoms (Can't locate loadable object
for module Socket ...)
while hello2.exe works.

Note that Socket.dll is packed in either case, the all lowercase name
for socket.pm
however seems to fool PAR so it doesn't associate
lib/auto/socket/Socket.dll with
lib/socket.pm.

Cheers, Roderich

Reply via email to