On Fri, 14 Jun 2002, Douglas S. Sparling wrote:

> [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,) but that's less of an issue in a mod_perl 
environment as you can normally do the compiling at server startup once.

As you might expect there's the standard reasons to use a module over a 
script that hold true for a plugin over inline Perl code.

 1. Code Reuse
 2. You can easily test modules as discrete lumps (test.pl, *.t, etc)
 3. Ease of extending the code (subclassing)

Later.

Mark.

-- 
s''  Mark Fowler                                     London.pm   Bath.pm
     http://www.twoshortplanks.com/              [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}



Reply via email to