X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doc%2Ffcgi-perl.htm;h=014c95356773ad08c5621887c12616e3f9ebbbd4;hb=bf00339bb4a4582979bfe26e714b9f1f6e8a0870;hp=058f10d34deb0e8e6706ad02fa0a8b62f43a1d20;hpb=0198fd3ca83ad0dbdb1c3bfb967d1843a7d02296;p=catagits%2Ffcgi2.git diff --git a/doc/fcgi-perl.htm b/doc/fcgi-perl.htm index 058f10d..014c953 100644 --- a/doc/fcgi-perl.htm +++ b/doc/fcgi-perl.htm @@ -6,8 +6,8 @@ vlink="#555555">
% setenv PERL5LIB $INSTALL/lib:$INSTALL/lib/sun4-solaris/perl5.003_02- +
[...] > make install - -
+ +@@ -423,64 +423,44 @@ not really want to re-run Configure, you can take the following steps.
THIS IS NOT RECOMMENDED
Edit config.sh with your favorite editor and modify the following lines: -
-One you have edited config.sh you should do a "make Makefile depend all". -If you're paranoid like me you may want to do a "make clean" first. -
- - --The Perl program examples/tiny-perl-fcgi performs the same function as -the C program examples/tiny-fcgi that's used as an example in the -FastCGI Developer's Kit document. -Here's what the Perl version looks like: -
-+
One you have edited config.sh you should do a "make Makefile depend + all". If you're paranoid like me you may want to do a "make clean" + first.
+The Perl program examples/tiny-perl-fcgi performs the same + function as the C program examples/tiny-fcgi that's used + as an example in the FastCGI Developer's + Kit. Here's what the Perl version looks like:
+#!./perl use FCGI; $count = 0; @@ -492,65 +472,54 @@ while(FCGI::accept() >= 0) { " running on host <i>$ENV('SERVER_NAME')</i>"); }- -If you've built Perl according to the recipe and you have a Web server set -up to run FastCGI applications, load the FastCGI Developer's Kit Index Page -in that server and run this Perl application now.
- -The script invokes Perl indirectly via the symbolic link -examples/perl. It does this because HP-UX has a limit of 32 -characters for the first line of a command-interpreter file such as -examples/tiny-perl-fcgi. If you run on HP-UX you won't want -to sprinkle symbolic links to perl everywhere, so you should -choose a PERL_PREFIX shorter than /usr/local/perl5-fcgi.
- -You need to be aware of the following bug. If the -initial environment to a FastCGI Perl application is empty (contains -no name-value pairs) then when the first call to FCGI::accept -returns, the environment will still be empty, -i.e. %ENV will contain no associations. All the variables -associated with the first request are lost. There are two known -workarounds:
- -
-
- -The Perl subroutine FCGI::accept treats the initial -environment differently than the C function FCGI_Accept. The -first call to the -C function FCGI_Accept replaces the initial environment with -the environment of the first request. The first call to the Perl subroutine -FCGI::accept adds the variable bindings of the first request -to the bindings present in the initial environment. So when the first -call to FCGI::accept returns, bindings from the initial -environment are still there (unless, due to naming conflicts, some of -them have been overwritten by the first request). The next call to -FCGI::accept removes the bindings made on the previous call -before adding a new set for the request just accepted, again preserving -the initial environment.
- -The Perl FCGI module also includes -subroutines FCGI::finish, FCGI::set_exit_status, -and FCGI::start_filter_data that correspond to -C functions in fcgi_stdio.h; see the manpages for -full information.
- -Converting a Perl CGI application to FastCGI is not fundamentally -different from converting a C CGI application. You separate -the portion of the application that performs one-time -initialization from the portion that performs per-request -processing. You put the per-request processing into a loop -controlled by FCGI::accept.
- -