Re: Cannot open included file test.tmpl

Karen <[email protected]> Wed, 2 May 2007 12:21:21 -0500
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
On 5/2/07, Alicia Amadoz <[email protected]> wrote:
> I have read something about environment variables HTML_TEMPLATE_ROOT
> and HTML_TEMPLATE_PATH but I am very confused with how they should be
> defined. Could anyone help me to solve this error?

You can set the environment variables within Perl like so:

$ENV{'HTML_TEMPLATE_ROOT'} = '/whatever/your/template/path/is';

You can also pass it from the environment (hence the name) but that
introduces some taint issues.  The "new" statement has a "path" option
as well, which will be checked after the environment variable.

And you can explicitly put the fully specified filename in the "new"
statement (by starting it with "/") - useful for debugging, but of
course if you do this everywhere and want to change it later, it
defeats the purpose of the path variables.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/