Template::TT3::Developer::Compatibility - Backward compatibility for TT developers
This is a rough draft of the developer documentation that will discuss backwards compatibility between TT3 and TT2.
As Bob Dylan said: "Eveything's broken". Sorry, but everything inside TT3 is different to how it was in TT2.
The monolithic service module from TT2 has been replaced by a number of small, simple service modules that each perform one task and one task only (e.g. add a header, add a footer, etc). These can be combined in all sorts of interesting ways to create your own custom template processing service pipelines. Or you can just use the default service pipeline which allows you to add headers, footers, wrappers, and all the other things that TT2 allowed you to add.
See Template::TT3::Services for an introduction to services. Please be aware that the service pipeline code is quite new and subject to change.
Performs a similar role in TT3 as its counterpart in TT2, but it has an all-new API and implementation.
No longer exists. The high-level "get/set this variable" functionality is now in Template::TT3::Context . The dotop mechanism is implemented in Template::TT3::Variable and subclasses. The virtual methods are implemented in Template::TT3::Type and subclasses.
Please note that the Template::TT3::Variables module was used during development (and is still being used at the time of writing) but it's due for deprecation (although I may change my mind). Don't get too attached to it
This has been split into a whole bunch of modules.
Template::TT3::Templates
is the master template manager.
Template::TT3::Cache
handles the in-memory
cache and
Template::TT3::Store
handles to on-disk storage of compiled
templates. Both are API compatible with Cache::Cache
modules making it
easy for you to drop in your own replacements for these.
The Template::TT3::Provider module is a base class for a new set of low-level template providers that only have to worry about loading a template from a file, database, or some other source and returning a hash array containing some information about the template. This makes them much simpler that the old TT2 provider module.
Template::TT3::Provider::File
is the main provider that loads files
from the filesystem.
Template::TT3::Provider::Cwd
is a special case
filesystem provider that is engaged when no template_path
is specified.
This looks in the current working directory for templates that are specified
with a relative path.
Replaced with Template::TT3::Template , but it's much changed.
Andy Wardley http://wardley.org/