libapa...erlRun(3pm)
π ModPerl::PerlRun β the manual, but make it give β¨
okay so bestie, this is ModPerl::PerlRun from the User Contributed Perl Documentation, manual page libapa...erlRun(3pm). It's the thing that runs your unaltered CGI scripts under mod_perl. no cap. let's go π«Ά
πΈ NAME πΈ
ModPerl::PerlRun β run your CGI scripts unaltered under mod_perl, bestie π
π SYNOPSIS π
here's the whole vibe, drop it straight into httpd.conf:
# 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>
like. that's it. iconic. β¨
π¦ DESCRIPTION π¦
META: document that for now we don'tchdir()into the script's dir, because it affects the whole process under threads.ModPerl::PerlRunPreforkshould be used by those who run only under prefork MPM.
so yeah β the chdir() thing? not happening right now, because under threads it messes with the whole process, not just your little script π if you're only ever running under prefork MPM, ModPerl::PerlRunPrefork is the one for you. periodt.
π₯ SPECIAL BLOCKS π₯
β BEGIN Blocks
when you're running under the ModPerl::PerlRun handler, BEGIN blocks do this:
BEGINblocks defined in scripts running under theModPerl::PerlRunhandler are executed on each and every request. yes, every single one. she works hard π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 β but only if those modules declare no package. if a package is declared, theBEGINblocks run only the first time each module is loaded, because those modules don't get reloaded on subsequent requests. iykyk π§
also see: BEGIN blocks in mod_perl handlers.
π CHECK and INIT Blocks
same as normal mod_perl handlers. no drama, no notes π
π END Blocks
same as ModPerl::Registry. that's the whole story bestie π«Ά
πΈ AUTHORS πΈ
- Doug MacEachern
- Stas Bekman
π¦ SEE ALSO π¦
ModPerl::RegistryCookerModPerl::Registry
and that's the page, bestie!! this was perl v5.42.3, dated 2026-08-20, from libapa...erlRun(3pm) π tysm for reading, go run some unaltered CGI scripts, slay β¨ππ
π¦ where this page comes from
- ubuntu stonking: libapache2-mod-perl2 2.0.13-2build3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms