Loading ...
Sorry, an error occurred while loading the content.

is there a templating system that....

Expand Messages
  • Jonathan Vanasco
    can someone suggest to me a templating system that does not have a mini-language or is executed - or if it is, it is with low overhead -- i don t want to
    Message 1 of 33 , Aug 12, 2005
    • 0 Attachment
      can someone suggest to me a templating system that does not have a
      mini-language or is 'executed' - or if it is, it is with low overhead
      -- i don't want to compile more into the mod_perl process than
      necessary

      i don't have a need for any of the mini-language features -- i think i
      mostly need to only do the equivalent of find/replace (ie regex text
      into a slot) -- i just don't want to write a bunch of code that handles
      how to escape user-submitted info.

      I've been thinking of using html::tree for the templates, and putting
      data in divs that get specifically altered (i think that would probably
      be a bit faster than using PETAL, which is my 2nd in line option)

      I was hoping that someone here might be able to point me in another
      direction.
    • David Nicol
      ... FWIW, I have just uploaded TipJar::Template::fill to CPAN. It is an abstraction around the s/// operator, that creates fill subroutines in the caller s
      Message 33 of 33 , Aug 15, 2005
      • 0 Attachment
        On 8/15/05, Matisse Enzer <matisse@...> wrote:

        > Just a data point:
        > I'm the maintainer of Text::TagTemplate and will soon release a version
        > that lets you set the regexes that define the start and end of a tag.

        FWIW, I have just uploaded TipJar::Template::fill to CPAN. It
        is an abstraction around the s/// operator, that creates fill subroutines
        in the caller's package, that substitute data into templates. It defaults
        to using [square_brackets] but takes "regex" as an argument, so it
        could be configured to read simple petal templates or templates from
        any other system as long as variable substitution is all you want to do.

        The hash from which the data is read to substitute in is configurable
        with a "hashref" argument and defaults to a hash with the same name
        as the subroutine, which defaults to "fill."

        Please direct feedback on it to me off-list and I will modify the documentation
        accordingly, for instace including a list of regexes to make it handle simple
        replacement templates from all the systems Perrin Harkins lists in his
        comparison
        article.

        --
        David L Nicol
        The original republican:
        http://cronos.advenge.com/pc/Honest_Abe
      Your message has been successfully submitted and would be delivered to recipients shortly.