I've been coding and maintaining
CGI::Ex::Template (part of the
CGI::Ex suite) for year and a half now. The module has grown and matured and is in need of moving into its own namespace. I think it actually needed to move into its own space a year ago.
So, the big question is, can anybody think of a good namespace. Asking for a namespace in the Template, CGI, or HTML namespaces is pretty hard these days - at least if you would like the name to mean anything.
I hear everybody going, "Oh great another template module - just what we need." Well you're right. It is another template module. So why am I bothering? Here are some of the features of the version 2.13 which was uploaded today (based on my biased opinions):
- It supports the TT2 interface and syntax
- It supports the TT3 interface and syntax
- It supports the HTML::Template interface and syntax
- It supports the HTML::Template::Expr interface and syntax
- It allows loading templates from any of the various syntaxes in any of the other syntaxes.
- It is generally faster than both TT and HT.
- It has an XS module that allows it to be as fast as HTML::Template::JIT - HTJ is very fast (with more work the XS module could always be faster - my C is terrible).
- It is easily extensible - it is possible to add new syntaxes (mini-languages), directives, operators, and vmethods.
- It is lighter (memory wise) than TT and HTE and only a little heavier than HT.
- It is modular enough that it could be used to provide TT3 parsing on today's TT2 engine (see Template::Parser::CET).
- It is hopefully modular enough that it could be used by the HT and TT3 camps for other code (it might not be yet, but once it is in its own module space I think it will be)
- It stays true to HTML::Templates minimalist ideals, or it gives HTML::Templates all of the TT2/TT3 extras - you pick.
- Uses a simple arrayref based opcode tree (AST) - simple enough to pass to JSON objToJson.
Here are some of the cons:
- It was written by me.
- It is a third module not sponsored by either of the TT or HT camps.
- It doesn't have a mailing list yet.
- It duplicates a lot of the documentation.
So, at this point I have no idea really what to call it. It does templates. It does different kinds of templates. It can be used in CGI's but doesn't have to be. It can be used to do HTML but doesn't have to be.
So here are some seed ideas:
- Template::Any - not necessarily true - also partially conflicts with Any::Template.
- Template::All - again not necessarily true
- Template::Multi - closer - but not really discriptive
- YAT - Yet another Template
- YAT - YAT engine
- YAPT - sounds like apt.
- RBGPTE - regex based general purpose template engine
- DaintyFlower - has no meaning - but neither do most of my choices so far.
Or should I keep the name the same and move it to its own distribution (I don't really like the name now - it doesn't always have to pertain to CGIs).
Ideas?
my @a=qw(random brilliant braindead); print $a[rand(@a)];
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.