From: Mark Hampton
There is still an outstanding issue, the following code :
#!/usr/local/bin/speedy
BEGIN {
$0 = $^X unless ($^X =~ m%(^|[/\\])(perl)|(perl.exe)$%i );
}
# Problem for speedy CGI
use FindBin;
Give the following error :
Cannot find current script ''
at /usr/local/lib/perl5/5.6.1/FindBin.pm line
166
BEGIN failed--compilation aborted
at /usr/local/lib/perl5/5.6.1/FindBin.pm
line 166.
Compilation failed in require at ./test_speedy.cgi line 7.
BEGIN failed--compilation aborted at ./test_speedy.cgi line
7.
speedy_backend[1363]: perl_parse error
speedy[1361]: Cannot spawn backend process
The BEGIN block is a recommended fix to allow the use of
FindBin with
perl2exe. Perhaps you can see why this causes problems
under speedyCGI ?
Thanks for your help,
Mark
Logged In: YES
user_id=11128
speedy_opt_read_shbang sets argv[0] to "". THis is passed
to cmdline_split, which passes it back as arg0. That's put
into perl_argv[0], which is then taken by speedy_perl.c and
passed to perl_parse(). Perl_parse then assigns this to $^X.