Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Part of me wants to object, but part of me totally agrees.

    This is indeed why I'm pretty vocal against newbies creating their own templating language. They all start out "simple", and then slowly add variables (of course), and then decision and iteration. And once you have state/decision/iteration, you have turing completeness, and you start treating the templating language like a programming language, and it's all downhill from there.

    One of the things I like about Template Toolkit though is that it at le

    • Randal L. Schwartz
    • Stonehenge
    • I had a simple templating language for a year or so.

      I think when I hit the need for conditionals I realised I was heading for trouble and scrapped it for TT2.

      Lately, however, I've been trying desperately to resist writing Template::Tiny (minimalistic version of Template Toolkit) :)

      Of course, for the really simple templating language I just use...

      $text =~ s/\[\%\s*(\w+)\s*\%\]/$hash{$1}/ foreach 1 .. 10;

      or variations :)