[Templates] pre-compiling templates
allan
lambretta@inet.uni2.dk
Tue, 14 Jan 2003 22:31:20 +0100
darren chamberlain wrote:
> There is no explicit "How to precompile" section, but there are hints
> scattered around. See COMPILE_EXT, which your example shows that
> you've found, and COMPILE_DIR, which is the missing piece.
>
> > from the command line with tpage or is it possible via a browser?
>
> It is possible from anywhere you can invoke TT.
> my $template = Template->new({
> INCLUDE_PATH => "$websrc/" . APACHE_ADMIN_LIB,
> PRE_PROCESS => 'config',
> COMPILE_EXT => '.ttc', # compile extension in same dir
> COMPILE_DIR => '/tmp',
> });
>
> This will put your templates in $COMPILE_DIR/path/to/the/original; i.e.,
> the template /foo/bar/baz.tt2 will go into /tmp/foo/bar/baz.tt2.
ok thanks. it turned out to really be a file permission problem to me,
solved now. it works as i would expect and really does increase performance.
thanks again!
/allan