Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
325 lines (239 sloc) 10.6 KB

NAME

Template::TT3::Status - TT3 Development Status

INTRODUCTION

This document contains information relating to the current development status of the Template Toolkit.

TT3 is still at the pre-alpha stage. Nothing is guaranteed to work at present (although most things do). You should not use it any any production code unless you're extremely brave or somewhat foolhardy.

Although most of the code is working and tested (albeit incompletely), the documentation is mostly incomplete or completely missing.

I've begun the process of working through the modules doing a final cleanup and adding documentation. Modules marked with an [X] in the lists below have been done and should be ready for release. Those marked with [ ] are eagerly awaiting their turn.

WHAT'S HAPPENING RIGHT NOW?

This is my immediate stack as of Saturday 19th December.

* Element libraries are split.  Now finish off cleaning up individual
  element modules.

Sidetracked onto cleaning up factories:

* Template::TT3::Types

NOTE: many tests are failing (as of Saturday night) with undefined data errors. That's because I've changed the boolean operators to use value() instead of maybe(), but I haven't yet got around to updating the other elements (variable, etc) to make their value() methods less picky (i.e. more like maybe())

Core Modules

[ ] Template::TT3::App
[ ] Template::TT3::Base
[ ] Template::TT3::Class
[ ] Template::TT3::Constants
[ ] Template::TT3::Hub
[ ] Template::TT3::Modules
[ ] Template::TT3::Patterns
[ ] Template::TT3::Utils
[ ] Template::TT3::Test

Factory Modules

Factory modules are responsible for loading modules and instantiating objects. I'm in the process of migrating Template::TT3::Factory::Class to T~Class::Factory.

[X] Template::TT3::Factory                  # base class
[X] Template::TT3::Class::Factory           # metaprogramming class

[X] Template::TT3::Engines
[X] Template::TT3::Exceptions
[X] Template::TT3::Dialects
[X] Template::TT3::Providers
[X] Template::TT3::Types
[X] Template::TT3::Variables
[X] Template::TT3::Elements

[ ] Template::TT3::Services
[ ] Template::TT3::Tags
[ ] Template::TT3::Views

[ ] Template::TT3::Types
    - remove pre-defined types and have T~Variables manage the list
      instead

Element Modules

Elements are the basic nodes that comprise a parsed template tree. They're rather like DOM elements except that they can generate dynamic content. So they're more like opcodes, or perhaps somewhere in between.

Old Elements Libraries

I started off writing a smaller number of Template::TT3::Elements::* libraries that included many different element class definitions. However, it quickly became difficult to manage. Most elements have now been moved to individual module files. This makes it easier to subclass from existing element module (otherwise you have to know which library module the base class element is in and ensure that it has been pre-loaded). It also gives us somewhere to put the documentation for each element class instead of cramming it all into one monstrous file.

These are the current element library modules. This list should eventually dwindle to nothing as they are split up and replaced by individual element modules.

[ ] Template::TT3::Elements::Core
[ ] Template::TT3::Elements::Operator

Core Elements

[ ] Template::TT3::Element::Block
[X] Template::TT3::Element::Filename
[X] Template::TT3::Element::Keyword
[X] Template::TT3::Element::Literal
[X] Template::TT3::Element::Word
[ ] Template::TT3::Element::Sub

Text and String Elements

[X] Template::TT3::Element::Text
[X] Template::TT3::Element::String;
[X] Template::TT3::Element::Squote;
[X] Template::TT3::Element::Dquote;

Whitespace and Punctuation Elements

[X] Template::TT3::Element::Comment;
[X] Template::TT3::Element::Delimiter;
[X] Template::TT3::Element::Eof;
[X] Template::TT3::Element::Padding;
[X] Template::TT3::Element::Separator;
[X] Template::TT3::Element::TagStart;
[X] Template::TT3::Element::TagEnd;
[X] Template::TT3::Element::Terminator;
[X] Template::TT3::Element::Whitespace;

Variable Elements

These elements are used to represent variables and operations relating to variables (e.g. application of a function bound to a variable).

[ ] Template::TT3::Element::Variable::Apply
[ ] Template::TT3::Element::Variable

Construct

These elements implement data constructs, including hash definitions, list definitions and parenthesised expressions. e.g.

[%  list = [10, 20, 30]  %]
[%  hash = {a=10, b=20, c=30}  %]

The modules implementing constructs are:

[ ] Template::TT3::Element::Construct::Args
[ ] Template::TT3::Element::Construct::Hash
[ ] Template::TT3::Element::Construct::List
[ ] Template::TT3::Element::Construct::Parens
[ ] Template::TT3::Element::Construct

Operators

These elements implement various operators of the language.

[ ] Template::TT3::Element::Operator::Assign
[ ] Template::TT3::Element::Operator::Dot
[ ] Template::TT3::Element::Operator::Number    ** WORKING ON THIS **
[ ] Template::TT3::Element::Operator::Pair
[ ] Template::TT3::Element::Operator::Ternary
[ ] Template::TT3::Element::Operator::Text      ** WORKING ON THIS **

Sigils

These elements implement the sigil prefix operators: $, @ and %.

[ ] Template::TT3::Element::Sigil
[ ] Template::TT3::Element::Sigil::Hash
[ ] Template::TT3::Element::Sigil::Item
[ ] Template::TT3::Element::Sigil::List

Commands

These elements implement the runtime command keywords.

[ ] Template::TT3::Element::Command::As
[ ] Template::TT3::Element::Command::Block
[ ] Template::TT3::Element::Command::Decode
[ ] Template::TT3::Element::Command::Do
[ ] Template::TT3::Element::Command::Dot
[ ] Template::TT3::Element::Command::Else
[ ] Template::TT3::Element::Command::Elsif
[ ] Template::TT3::Element::Command::Encode
[ ] Template::TT3::Element::Command::Fill
[ ] Template::TT3::Element::Command::For
[ ] Template::TT3::Element::Command::Hello
[ ] Template::TT3::Element::Command::If
[ ] Template::TT3::Element::Command::Include
[ ] Template::TT3::Element::Command::Into
[ ] Template::TT3::Element::Command::Is
[ ] Template::TT3::Element::Command::Just
[ ] Template::TT3::Element::Command::Raw
[ ] Template::TT3::Element::Command::Slot
[ ] Template::TT3::Element::Command::Sub
[ ] Template::TT3::Element::Command::Unless
[ ] Template::TT3::Element::Command::With
[ ] Template::TT3::Element::Command::Wrapper

Controls

There's some work needed here to tidy up the command loading code. We should support command libraries so that we can merge the current (temporary) HTML_CMDS into COMMANDS.

e.g.

[? COMMANDS HTML.ul HTML.li HTML.div ?]
[? COMMANDS HTML.['ul' 'li' 'div'] ?]
[? COMMANDS HTML.{ul li div} ?]

These are the current modules implementing compile time controls:

[ ] Template::TT3::Element::Control::Commands
[ ] Template::TT3::Element::Control::Html
[ ] Template::TT3::Element::Control::HtmlCmds
[ ] Template::TT3::Element::Control::Meta
[ ] Template::TT3::Element::Control::Tags

Mixin Roles

These elements define roles that other elements can mix in to add functionality. They need organising into a proper hierarchy roughly corresponding to the methods that they implement. e.g.

Template::TT3::Element::Role::Expr::Args        # parse_expr() reads args
Template::TT3::Element::Role::Infix::Args       # parse_infix() reads args

The badly named as import hook defined by Template::TT3::Class should be renamed (it's a throwback to a time when the parse_XXX() methods were called as_XXX() so it made more sense then). In fact, it's probably worth adding a new Template:TT3::Element::Class module specialised to the task of creating element modules (yes, that's now been done but not all elements have been updated to use it)

use Template::TT3::Element::Class
    expr  => 'args',            # adds T~Role::Expr::Args
    infix => 'args';            # adds T~Role::Infix::Args

These are the modules as they currently stand:

[ ] Template::TT3::Element::Role::ArgsBlockExpr
[ ] Template::TT3::Element::Role::ArgsExpr
[ ] Template::TT3::Element::Role::Block
[ ] Template::TT3::Element::Role::BlockExpr
[ ] Template::TT3::Element::Role::ExprBlockExpr
[ ] Template::TT3::Element::Role::Filename
[ ] Template::TT3::Element::Role::NameBlockExpr
[ ] Template::TT3::Element::Role::NameExpr
[ ] Template::TT3::Element::Role::NullExpr
[ ] Template::TT3::Element::Role::Pair

WTF Elements

These are the elements that I'm not sure about. Some are junk that was thrown together for testing and are no longer required. Some have been deprecated or replaced but not yet deleted. Others I've just put here to remind me to look at them.

[ ] Template::TT3::Element::HTML::Table
[ ] Template::TT3::Element::HTML

Other Parsing Modules

[ ] Template::TT3::Grammar
[ ] Template::TT3::Scanner
[ ] Template::TT3::Scope
[ ] Template::TT3::Tag
[ ] Template::TT3::Tagset
[ ] Template::TT3::Tokens

Template Modules

[ ] Template::TT3::Templates
[ ] Template::TT3::Template
[ ] Template::TT3::Cache
[ ] Template::TT3::Store

Runtime Modules

[ ] Template::TT3::Context
[ ] Template::TT3::Iterator
[ ] Template::TT3::Services
[ ] Template::TT3::Service
[X] Template::TT3::Service::Before
[X] Template::TT3::Service::Header
[X] Template::TT3::Service::Footer
[X] Template::TT3::Service::Layout
[X] Template::TT3::Service::Wrapper

Data Management Modules

[ ] Template::TT3::Variables            ** being deprecated **
[ ] Template::TT3::Variable
[ ] Template::TT3::Variable::Code
[ ] Template::TT3::Variable::Hash
[ ] Template::TT3::Variable::List
[ ] Template::TT3::Variable::Object
[ ] Template::TT3::Variable::Undef

AUTHOR

Andy Wardley http://wardley.org/

COPYRIGHT

Copyright (C) 1996-2009 Andy Wardley. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.