Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've written a perl script which reads from and writes to a MySQL database, and appears to work correctly. However, when I convert it to a standalone executable with PerlApp, the executable cannot connect to the database. Looking at both programs in a debugger, they behave identically until a call to the function "socket", which fails in the the PerlApp executable, but not in the script. The error message when it fails is "An invalid argument was supplied.", but the same arguments were supplied in both cases.
A minimal version of the script that illustrates the problem is given below. As far as I can, I have checked that all of the modules called by the script have been included in the PerlApp executable: I don't know where the function "socket" is defined, so I haven't been able to check that. I'm running on Windows 7, if that makes a difference.
#! C:/perl5.14/bin/perl.exe use Socket; $proto = getprotobyname('tcp'); my($sock); socket($sock, AF_INET, SOCK_STREAM, $proto) or die $!; print "Success\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sockets and Perl App
by Anonymous Monk on Sep 10, 2013 at 18:29 UTC |