howars wrote:
The question of how to change the include path on the fly has been answered many times in the archive and usually the answer had nothing to do with Apache::Template. Can you take a look at those answers and then ask a more specific question if you have trouble following them?I've been gearing up for mod_perl'ing a few of our sites. We run several virtual hosts concurrently, and I am in a bind with include paths.... I know this story sounds familiar, as i have witnessed similar discussion on this list before.Except that I'm not running Apache::Template.
I am not particularly intersted in binding my application tightly to Apache (yet). This is why Apache::Registry and Apache::DBI are my friends - giving me speed increases without my need to change any code. Similarly, I'd love to be able to do something like this for each virtual host:
PerlModule Apache::DBI
PerlModule Apache::Registry_plus_Template
<FilesMatch "\.cgi$">
SetHandler perl-script
PerlHandler Apache::Registry_plus_Template
Options ExecCGI
PerlSendHeader On
</FilesMatch>
<Location /admin >
TT2IncludePath /usr/local/tt2/templates
TT2IncludePath /home/abw/tt2/lib
</Location>
You can set variables in httpd.conf using PerlSetVar directives and
reading them with $r->dir_config('IncludePath'). That does bind you to
mod_perl though. There's no way to really use the Apache conf file
without binding yourself to Apache.If you really want this to still work under CGI, make your own config file and set the include path in your script based on the URL and the config file.
- Perrin
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates
