docs::a...:PerlRun(3)
π NAME π
ModPerl::PerlRun β run unaltered CGI scripts under mod_perl. This is the docs::a...:PerlRun(3) page from the User Contributed Perl Documentation, bestie. π
β¨ Synopsis β¨
Hereβs the httpd.conf setup, exactly as written:
# httpd.conf
PerlModule ModPerl::PerlRun
Alias /perl-run/ /home/httpd/perl/
<Location /perl-run>
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
PerlOptions +ParseHeaders
Options +ExecCGI
</Location>
πΈ Description πΈ
Real talk: the page has a literal META note β META: document that for now we donβt chdir() into the scriptβs dir, because it affects the whole process under threads. So yeah, thatβs the situation. π«
Also important: ModPerl::PerlRunPrefork should be used by those who run only under prefork MPM. Periodt. π
π¦ Special Blocks π¦
π BEGIN Blocks π
When running under the ModPerl::PerlRun handler, BEGIN blocks behave as follows:
BEGINblocks defined in scripts running under theModPerl::PerlRunhandler are executed on each and every request.BEGINblocks defined in modules loaded from scripts running underModPerl::PerlRun(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 declaredBEGINblocks will be run only the first time each module is loaded, since those modules donβt get reloaded on subsequent requests.
See also BEGIN blocks in mod_perl handlers. iykyk π«
π§ CHECK and INIT Blocks π§
Same as normal mod_perl handlers. No cap.
β END Blocks β
Same as ModPerl::Registry. Slay.
π Authors π
- Doug MacEachern
- Stas Bekman
π See Also π
ModPerl::RegistryCooker and ModPerl::Registry.
mwah π β this page is from the User Contributed Perl Documentation, perl v5.42.3, dated 2023-10-21, and the manpage tag is docs::a...:PerlRun(3). iconic. πβ¨
π¦ where this page comes from
- nixos 26.05: mod_perl 2.0.13
- nixpkgs unstable: mod_perl 2.0.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms