Paul Johnston wrote:
> Haven't done perl for 7 years (yes 7 years) and just coming back, so am
> a newbie with mod_perl really.  Could do with a bit of setup help.
> 
> I have an application that I'm been building in Perl and it works fine
> as a cgi and I want to convert it to using mod_perl.  It's very
> modularised so caching of perl modules in memory would be hugely helpful.
> 
> It's currently on my server (which hosts other apps), and I want all
> (and only) files on the specific virtual host ending in ".app" (ie like
> everything ending in .pl) to be handled by mod_perl.
> 
> Can you please help with apache setup for this purpose.  If it's complex
> and means running *all* files that are under the virtual host root
> through mod_perl then so be it.  I don't see why it should be though.
> 
> Would really appreciate your help.
> 
> Thanks
> 
> Paul
> 
> 

<VirtualHost ... >
PerlModule ModPerl::Registry

--------------8<--------------
# Handle all files ending in .pl with mp2
<Files ~ \.pl>
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   #PerlOptions +ParseHeaders
   #PerlOptions -GlobalRequest
   Options +ExecCGI
</Files>
--------------8<--------------

</VirtualHost>

http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends

Take a look at the second URL and ModPerl::RegistryPrefork because it
may safe hard times ;-)

Tom

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to