OK, I see why you implemented the compile structure the way you did. Your reasoning
makes perfect sense. But in my specific case I only have a 1-2 directorys of
templates, and have no overlapping filenames. What about having an option that just
saves the relative paths, rather than a full path, in the compile directory? I've
never looked at the TT code, so I have no idea how difficult this request would be, or
if it's even feasible.
In the meantime I'll probably go ahead and turn compiling back on because it's such a
speed gain. Do you have any benchmarks on the performance difference between compiled
and non-compiled templates. I'm also running this app under CGI, so I suspect that the
extra time saved by compiling might not be noticible next to the time to fork the CGI
process.
Either way, thanks for an awesome template system! It ROCKS. :-)
> On Wed, 13 Jun 2001, Andy Wardley wrote:
>
> > On Tue, Jun 12, 2001 at 08:48:58AM -0400, Drew Taylor wrote:
> > > Count me in for this feature too. It bugs me that I have a whole large
> > > directory structure to store my 2 levels of templates.
> >
> > There are a couple of problems with this. This first is that you could
> > have more than one directory in your INCLUDE_PATH with the same file.
> > e.g.
> >
> > my $tt2 = Template->new({
> > INCLUDE_PATH => '/foo:/bar',
> > COMPILE_DIR => '/tmp/tt2',
> > });
> >
> > The file 'baz' could exist as both '/foo/baz' and '/bar/baz' but you
> would
> > lose that distinction if you cached them as '/tmp/tt2/baz' instead of
> > '/tmp/tt2/foo/baz' and '/tmp/tt2/bar/baz'.