Typist::Template::Context - contains and manages the context for a template
Set/get and template variable.
These three methods register template tags and take the same parameters. The difference is how the build will treat them. They require parameters of the tag name and a CODE reference to the tag handler.
If $this is an object the tag's scope will be tied to that specific object rather then the Typist::Template::Context class.
add_tag registers a variable tag. These tags must use $ inside the angle brackets such as <$MTEntryTitle$> These types of tags do not have any type of contents.
add_tag
<$MTEntryTitle$
add_container_tag registers a tag which can contain text or other tags. Use container tags to create loops or specific contexts.
add_container_tag
add_conditional_tag registers a special type of container tag that renders its contents if a some condition is true. These tag handlers need only return a true or false value. The rest is handled automatically. Container tags work with the built-in Else tag to render context if a conditional does not evaulate as true.
add_conditional_tag
Else
Registers a global filter handler. Requires the name of the filter and a reference to the filter handler be passed.
If $this is an object the filter's scope will be tied to that specific object rather then the Typist::Template::Context class.
To install Typist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Typist
CPAN shell
perl -MCPAN -e shell install Typist
For more information on module installation, please visit the detailed CPAN module installation guide.