Matisse Enzer wrote:
What's the "right way" in mod_perl2 to find the PATH_TRANSLATED in a PerlRepsonsehandler?
The general situation is that i am trying to replace a CGI with a PerlResponsehandler. The CGI is currently used like this:
<Location /special> Action text/html /cgi-bin/handler.cgi </Location>
The CGI script used PATH_TRANSLATED to find out which file was wanted, and then applies a templating system to it, replacing server-side tags with database content.
Can I get access to PATH_TRANSLATED in a PerlRepsonseHandler?
if you're using the mod_perl API, you can get PATH_TRANSLATED by joining $r->filename and $r->path_info. according to the docs, calling $r->subprocess_env in a void context will populate standard CGI variables in $r->subprocess_env();
if it's a normal CGI script, if you use the perl-script handler, or the modperl handler with PerlOptions +SetupEnv, you should be able to get at it via %ENV.
HTH
--Geoff