[Templates-cvs] cvs commit: TT3 TODO
cvs@template-toolkit.org
cvs@template-toolkit.org
Mon, 13 Dec 2004 13:31:14 +0000
cvs 04/12/13 13:31:14
Modified: . TODO
Log:
* updated TODO
Revision Changes Path
1.10 +60 -128 TT3/TODO
Index: TODO
===================================================================
RCS file: /template-toolkit/TT3/TODO,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TODO 2004/12/12 16:48:28 1.9
+++ TODO 2004/12/13 13:31:13 1.10
@@ -1,8 +1,8 @@
#------------------------------------------------------------------------
# random notes that I'm adding as I go along...
#------------------------------------------------------------------------
+
Dec 12
- - Template::Utils find_module()
Dec 09
- Template::Context should use parent locations when locating
@@ -30,11 +30,6 @@
$stash->set(x, 10)) but needs to be different for default, constants, my
vars, etc.
-Nov 24
- - given that foo.'bar bam' works in treated the quoted 'bar bam' as a variable
- name, should 'foo bar'.bam work the same way, or should it treat the first
- node as a literal string?
-
Nov 23
- add index() method to Template::Modules (particularly Directives) and
other resource providers
@@ -43,11 +38,6 @@
in a subsequent invocation of the object (e.g. tagset, directives, etc.)
that are recreated on each template parsed.
-Nov 21
- - remove config items such as load_source (Template::Resource::Template)
- and change factory, etc., to accept a hash ref including 'module' (load)
- or 'class' (don't load) items.
-
Nov 19
- What about having Tag::Directive check keyword of next directive and call
$handler->expects() to check it's OK before we proceed into $dir->parse();
@@ -61,64 +51,14 @@
or just Template::Tagset?)
- allow [% END_IF %] or [% END-IF %] or [% END(IF) %] or something similar
-Nov 04
- - Template::Base
- move out superfluous module() and object() methods.
-
-
-#-------------------------------------------------------------------------
-# TT2 Directives (x marks those that are done)
-#------------------------------------------------------------------------
-
- x TAGS
- x GET
- CALL
- x SET
- DEFAULT
- INSERT
- PROCESS
- x INCLUDE
- x WRAPPER...END
- FOR...END
- FILTER...END
- x IF...ELSIF...ELSE...END
- x UNLESS...END
- x SWITCH...CASE
- TRY...CATCH...FINAL...END
- USE
- VIEW...END
- PERL...END
- RAWPERL...END
- x BLOCK...END (named and anonymous)
- x MACRO
- THROW
- RETURN
- STOP
- CLEAR
- NEXT
- LAST
- DEBUG
-
-
-#------------------------------------------------------------------------
-# New TT3 Directives
-#------------------------------------------------------------------------
-
- x INTERPOLATE
- CONSTANT
- x MY
- CAPTURE
-
#------------------------------------------------------------------------
-# Other misc items in no particular order
+# Other misc items in no particular order... most of these are scribbled
+# in my two jumbo notepads and various other books, scraps of paper,
+# etc., so this list is very incomplete.
#------------------------------------------------------------------------
-
- * template::source
-
- * provider generating source with all options passed
- * provider define load() as a callback
+ * provider generating Template::Source with all options passed
* whole issue of where source/components store options, etc.,
and what gets passed between cloned components.
@@ -126,89 +66,85 @@
* providers returning undef to indicate not found, or subroutines
that return undef??
- * errors, declines and exception handling
- things that must throw an error and return undef for decline
- - cache - done
- - store - done
- - templates - done
- - provider - not sure
- - compiler
- - in fact, pretty much everything
- The only issue remaining is what constructors should do on failure?
- Either return undef, with error() used to fetch errors, or should
- they throw an exception? Returning undef is better because it makes
- it easier to check for errors:
-
-
-#------------------------------------------------------------------------
-# More notes relating to specific modules or things that need doing
-#------------------------------------------------------------------------
-
-Utils
* think about TT paths (always use '/') vs filesystem specific paths
-Document / Provider
- * allow time argument to fresh()
- * what to call various members?
- text = template text
- code = compiled Perl code (or perl?)
- body = Perl subroutine reference (or main/code/sub/etc?)
-
-Component
- * either: header() / template() / templates() / footer()
- or: head() / body() / subs() / foot() (or tail())
- * restore($source) should be implemented here (not in source)
-
-
-Templates
- * should we return a Template::Document, a Template::Component, or
- something else, and how should any of the above inherit from each
- other? (Now thinking Template::Template subclassed from T::Component)
-
* what about loading template but not compiling, e.g. for INSERT?
-Provider
- * should we pass the context in to fetch()? Do we need to? It would
- allow provider to call back on context to create document object.
-
-Scanner
* clean up dos and mac line endings
s/\r\n?/\n/g;
* disable interpolate in PERL blocks
* have TAGSET option to load/use an entire tagset
-
[% TAGSET none %] # no tags whatsoever
[% TAGSET tt3 %] # just tt3 tags
[% TAGSET abw %] # custom tagset
-Tests
- * test new features of tags like tag_error()
+#-------------------------------------------------------------------------
+# TT2 Directives (x marks those that are done)
+#------------------------------------------------------------------------
- * variable and emdedded tags should call handler->commit()
+ x TAGS # done
+ x GET # done
+ CALL # trivial
+ x SET # done
+ DEFAULT # need to figure out stash set() flag
+ INSERT # can load text only but must disable compilation
+ PROCESS # easy, like include() but waiting on process() method
+ x INCLUDE # done
+ x WRAPPER...END # done
+ FOR...END # parsing is a little tricky, no iterator yet anyway
+ FILTER...END # need to figure out how/where filters fit in
+ x IF... # done
+ ELSIF...
+ ELSE...
+ END
+ x UNLESS...END # done
+ x SWITCH...CASE # done
+ TRY... # similar to SWITCH/CASE
+ CATCH...
+ FINAL...
+ END
+ USE # not too hard, got plugins ready
+ VIEW...END # dunno about this - may be deprecated
+ PERL...END # need to fit in EVAL_PERL option to enable
+ RAWPERL...END # ditto, also must INTERPOLATE off
+ x BLOCK...END # done both named and anonymous, but generators need work
+ x MACRO # done
+ THROW # easy
+ RETURN # easy but needs whole mechanism checking
+ STOP # ditto
+ CLEAR # easy, but waiting on output settling
+ NEXT # easy, waiting on FOREACH
+ LAST # ditto
+ DEBUG # needs a careful think
+
- * make embedded tag an open tag, have it call the parse_directive()
- method and allows nested embedded variables, e.g. ${ foo.${bar.${baz}} }
+#------------------------------------------------------------------------
+# New TT3 Directives
+#------------------------------------------------------------------------
+ x INTERPOLATE # done
+ CONSTANT # half-done, need to figure out generators
+ x MY # done
+ CAPTURE # probably not required with nested tags
-#========================================================================
-# Current status of TT modules, documentation and related tests.
-#========================================================================
-Template::Base
-
- - code is complete and working. Move module() and object() out into
- Template::Utils (if still required) or delete altogether.
+#------------------------------------------------------------------------
+# Modules that are completely finished, tested, documented and listed in
+# in docs/modules.pod. This section is growing.
+#------------------------------------------------------------------------
- - documentation needs minor tweaks to update decline() and declined()
- methods (which have changed slightly) and to remove module() and
- object().
+Template::Base
+Template::Utils
- - t/base.t is ok, but module() and object() tests need to be removed
+#------------------------------------------------------------------------
+# Modules that aren't. This section is hopefully shrinking faster than
+# it's growing.
+#------------------------------------------------------------------------
Template::Cache
@@ -444,10 +380,6 @@
setup for TT3 (whereas the Template::* module mostly provide only basic
facilities). Needs a thorough review, but again, not until the
TT code architecture is finalised.
-
-Template::Utils
-
- - TODO: haven't reviewed this yet
Template::Variables