in reply to Re^4: Generation of dynamically-static documents
in thread Generation of dynamically-static documents

It is very easy to use DBI and such from inside a TT2-template and if all else fails you can use pure Perl in the templates.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^6: Generation of dynamically-static documents
by adrianh (Chancellor) on Sep 13, 2005 at 08:03 UTC
    It is very easy to use DBI and such from inside a TT2-template and if all else fails you can use pure Perl in the templates.

    And that way lies madness :-)

    Throwing Perl code and direct DBI access into TT2 templates rapidly produces an unmaintainable mess in my experience.

      Yes, but it takes a genius to master chaos!

      Seriously, it is not much different from adding print-statements with HTML-code in your Perl-script.

      It would take something like Catalyst to keep all the various concerns nicely separate.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        Seriously, it is not much different from adding print-statements with HTML-code in your Perl-script.

        You're right it's not much different, just from the opposite direction.

        This, of course, doesn't mean that it is a good thing :-)

        It would take something like Catalyst to keep all the various concerns nicely separate.

        Nope. All it takes is writing presentation oriented TT2 plugins. Easy.