Perrin Harkins wrote:
> On Feb 6, 2008 10:06 PM, Mag Gam wrote:
>
>> Currently, when I open a file I have to use the
>> absolute path (/var/www/appname/top.inc). Is it possible for me to use just
>> 'top.inc'?
>>

>
> You can either use DocumentRoot
> (http://perl.apache.org/docs/2.0/api/...document_root_)
> or use ModPerl::RegistryPreFork which will chdir to the directory your
> script is in just like a normal CGI script does. That would let you
> use files relative to the script.
>
> - Perrin
>


Few quirks with document root. Your application may not be hosted under
document root. you may have all your templates and customizations some
where else.

I think better option would be to define the template/support files
location in Directory Configuration or in a Database configuration
table. That would be more staple solution.

in your .htaccess or on the Location/Directory Configuration put a line
that says

PerlSetVar AppsSupportFiles "/home/httpd/support/site1/template"


and access this parameter from your $r->dir_config('AppsSupportFiles')


I think this may be more customizable and scalable solution to your problem

-Chandra