NAME

Top Close Open

Template::TT3::Developer::Modules - the modules comprising TT3

INTRODUCTION

Top Close Open

This is a rough draft of the developer documentation that will give an overview of the modules that comprise TT3.

Higher Level Modules

Top Close Open

Front End: Template3

Top Close Open

For end users. Thin facade. Can switch between implementation engines.

Engines: Template::TT3::Engine(s)

Top Close Open

Runtime engine. Different engines (e.g. TT2 and TT3) may implement different APIs, functionality, etc.

Services: Template::TT3::Service(s)

Top Close Open

For creating template processing pipelines.

Dialects: Template::TT3::Dialect(s)

Top Close Open

Implement template languages, e.g. TT3, TT2, etc.

Template Management Modules

Top Close Open

Template::TT3::Templates

Top Close Open

This module is responsible for finding, loading and caching template. It uses the Template::TT3::Provider modules to find and load templates then caches them in memory and/or on disk using Template::TT3::Cache and Template::TT3::Store

Template::TT3::Provider

Top Close Open

This is a base class for providers that find and load templates. The Template::TT3::Provider::File module is a subclass for loading templates from the filesystem. Others may follow.

Template::TT3::Template

Top Close Open

This is an object used to represent templates.

Data Management Modules

Top Close Open

Template::TT3::Context

Top Close Open

A context is a place to store variable data and provide access to resources like templates, plugins, etc. In TT3 the context object also includes most of the high-level functionality of the TT2 Template::Stash.

Template::TT3::Variable

Top Close Open

Base class object for representing template variables. This is subclassed into specialised objects for different data types: hash arrays, lists, objects, etc.

Template::TT3::Type

Top Close Open

Base class object for data types. These modules implement the virtual methods for different data types: hashes, lists, text.

Scanning, Parsing and Compilation Modules

Top Close Open

Template::TT3::Scanner

Top Close Open

Scans templates for text and tags. Uses a tagset to define what tags to find.

Template::TT3::Tagset

Top Close Open

Defines a set of tags, e.g. the Template::TT3::Tagset::TT3 tagset defines the inline, outline, comment and control tags.

Template::TT3::Tag

Top Close Open

Implements the scanning and tokenising logic for a particular kind of tag. E.g. inline tags are specialised to look out for the end-of-tag token, control tags have effect at compile time, comment tags do nothing.

Template::TT3::Tokens

Top Close Open

Collects tokens emitted by the scanner and tags during tokenisation. Each token is represented by an element object. This is a bit of a mess and I'll probably jiggle things around a bit here.

Template::TT3::Scope

Top Close Open

Used to represent a lexical scope in a template.

Template::TT3::Elements

Top Close Open

Factory class for loading and instantiating element objects.

Template::TT3::Element

Top Close Open

Base class for elements. There's a fair bit of documentation in this module which describes the tokenising and parsing process. It's incomplete (and possibly inaccurate in places), but it's a good start.

This module is then subclasses into umpty different element modules that represent different parts of the TT3 language: text chunks, numbers, words, operators, end so on.

Template::TT3::Grammar

Top Close Open

Defines a collection of operators and keywords that comprise a template language.

Views

Top Close Open

Template::TT3::View

Top Close Open

This is a base class visitor module for creating views of a parsed template tree. It is subclasses into two main categories for views working on either a token-based view of the template (e.g. for reconstituting the template source including all whitespace and other ignorable tokens) or an expression based view that operates on the parsed tree.

Support Modules

Top Close Open

Base, class, constants, utils, moduels, hub, exception, test.

TODO

Top Close Open

The above list is incomplete.

AUTHOR

Top Close Open

Andy Wardley http://wardley.org/

COPYRIGHT

Top Close Open

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.


http://tt3.template-toolkit.org/docs/Template/TT3/Developer/Modules.pod last modified 2009-12-13 20:23:50