[Petal] Petal and Mod_Perl?

Josh Narins josh at narins.net
Tue Aug 16 16:13:51 BST 2005


> Is there a way to pre-cache petal templates in mod_perl before apache  
> forks?
> 
> Google hasn't helped me on this.

Well, this isn't help so much from the Petal end,
but if you want something done pre-fork, do it in your startup.pl script

#httpd.conf
PerlRequire                /path/to/startup.pl

or in another PerlRequire script.

NOTE: Anyone who can edit PerlRequire'd scripts effectively has root
access during apache startup.

There are also PerlInitHandlers

#also httpd.conf
PerlInitHandler  Module::Name

that get called once each time a child starts up.


More information about the Petal mailing list