.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "docs::api::ModPerl::PerlRun 3pm" .TH docs::api::ModPerl::PerlRun 3pm 2024-01-10 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ModPerl::PerlRun \- Run unaltered CGI scripts under mod_perl .SH Synopsis .IX Header "Synopsis" .Vb 9 \& # httpd.conf \& PerlModule ModPerl::PerlRun \& Alias /perl\-run/ /home/httpd/perl/ \& \& SetHandler perl\-script \& PerlResponseHandler ModPerl::PerlRun \& PerlOptions +ParseHeaders \& Options +ExecCGI \& .Ve .SH Description .IX Header "Description" META: document that for now we don't \fBchdir()\fR into the script's dir, because it affects the whole process under threads. \f(CW\*(C`ModPerl::PerlRunPrefork\*(C'\fR should be used by those who run only under prefork MPM. .SH "Special Blocks" .IX Header "Special Blocks" .ie n .SS """BEGIN"" Blocks" .el .SS "\f(CWBEGIN\fP Blocks" .IX Subsection "BEGIN Blocks" When running under the \f(CW\*(C`ModPerl::PerlRun\*(C'\fR handler \f(CW\*(C`BEGIN\*(C'\fR blocks behave as follows: .IP \(bu 4 \&\f(CW\*(C`BEGIN\*(C'\fR blocks defined in scripts running under the \&\f(CW\*(C`ModPerl::PerlRun\*(C'\fR handler are executed on each and every request. .IP \(bu 4 \&\f(CW\*(C`BEGIN\*(C'\fR blocks defined in modules loaded from scripts running under \&\f(CW\*(C`ModPerl::PerlRun\*(C'\fR (and which weren't already loaded prior to the request) are executed on each and every request only if those modules declare no package. If a package is declared \f(CW\*(C`BEGIN\*(C'\fR blocks will be run only the first time each module is loaded, since those modules don't get reloaded on subsequent requests. .PP See also \f(CW\*(C`BEGIN\*(C'\fR blocks in mod_perl handlers. .ie n .SS """CHECK"" and ""INIT"" Blocks" .el .SS "\f(CWCHECK\fP and \f(CWINIT\fP Blocks" .IX Subsection "CHECK and INIT Blocks" Same as normal mod_perl handlers. .ie n .SS """END"" Blocks" .el .SS "\f(CWEND\fP Blocks" .IX Subsection "END Blocks" Same as \&\f(CW\*(C`ModPerl::Registry\*(C'\fR. .SH Authors .IX Header "Authors" Doug MacEachern .PP Stas Bekman .SH "See Also" .IX Header "See Also" \&\f(CW\*(C`ModPerl::RegistryCooker\*(C'\fR and \f(CW\*(C`ModPerl::Registry\*(C'\fR.