> > [talking about templates verses inline perl]
> > Other than personal preference and the desire to keep code out of
the
> > templates, is there advantage to one method over the other?
>
> Well, there's one less compiling stage (Perl -> bytecode, rather than
> template -> Perl -> bytecode,)

Not really.  Even if your template just has [% PERL %] blocks in it, it
will still have to be compiled to perl.

> but that's less of an issue in a mod_perl
> environment as you can normally do the compiling at server startup
once.

Even under CGI, if you use the on-disk cache for compiled templates this
will only need to happen when you modify templates.  The perl ->
bytecode step happens every time for CGI, but only once for mod_perl (if
you compile templates on startup).

- Perrin



Reply via email to