.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Template::Alloy::TT 3pm" .TH Template::Alloy::TT 3pm "2013-08-23" "perl v5.18.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Template::Alloy::TT \- Template::Toolkit role .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Template::Alloy::TT role provides the syntax and the interface for Template::Toolkit version 1, 2, and 3. It also brings many of the features from the various templating systems. .PP And it is fast. .PP See the Template::Alloy documentation for configuration and other parameters. .SH "HOW IS Template::Alloy DIFFERENT FROM Template::Toolkit" .IX Header "HOW IS Template::Alloy DIFFERENT FROM Template::Toolkit" Alloy uses the same base template syntax and configuration items as \&\s-1TT2,\s0 but the internals of Alloy were written from scratch. Additionally much of the planned \s-1TT3\s0 syntax is supported as well as most of that of HTML::Template::Expr. The following is a list of some of the ways that the configuration and syntax of Alloy are different from that of \s-1TT2. \s0 Note: items that are planned to work in \s-1TT3\s0 are marked with (\s-1TT3\s0). .IP "\(bu" 4 Numerical hash keys work .Sp .Vb 1 \& [% a = {1 => 2} %] .Ve .IP "\(bu" 4 Quoted hash key interpolation is fine .Sp .Vb 1 \& [% a = {"$foo" => 1} %] .Ve .IP "\(bu" 4 Multiple ranges in same constructor .Sp .Vb 1 \& [% a = [1..10, 21..30] %] .Ve .IP "\(bu" 4 Constructor types can call virtual methods. (\s-1TT3\s0) .Sp .Vb 1 \& [% a = [1..10].reverse %] \& \& [% "$foo".length %] \& \& [% 123.length %] # = 3 \& \& [% 123.4.length %] # = 5 \& \& [% \-123.4.length %] # = \-5 ("." binds more tightly than "\-") \& \& [% (a ~ b).length %] \& \& [% "hi".repeat(3) %] # = hihihi \& \& [% {a => b}.size %] # = 1 .Ve .IP "\(bu" 4 The \*(L"${\*(R" and \*(L"}\*(R" variable interpolators can contain expressions, not just variables. .Sp .Vb 1 \& [% [0..10].${ 1 + 2 } %] # = 4 \& \& [% {ab => \*(AqAB\*(Aq}.${ \*(Aqa\*(Aq ~ \*(Aqb\*(Aq } %] # = AB \& \& [% color = qw/Red Blue/; FOR [1..4] ; color.${ loop.index % color.size } ; END %] \& # = RedBlueRedBlue .Ve .IP "\(bu" 4 You can use regular expression quoting. .Sp .Vb 1 \& [% "foo".match( /(F\ew+)/i ).0 %] # = foo .Ve .IP "\(bu" 4 Tags can be nested. .Sp .Vb 1 \& [% f = "[% (1 + 2) %]" %][% f|eval %] # = 3 .Ve .IP "\(bu" 4 Arrays can be accessed with non-integer numbers. .Sp .Vb 1 \& [% [0..10].${ 2.3 } %] # = 3 .Ve .IP "\(bu" 4 Reserved names are less reserved. (\s-1TT3\s0) .Sp .Vb 1 \& [% GET GET %] # gets the variable named "GET" \& \& [% GET $GET %] # gets the variable who\*(Aqs name is stored in "GET" .Ve .IP "\(bu" 4 Filters and \s-1SCALAR_OPS\s0 are interchangeable. (\s-1TT3\s0) .Sp .Vb 1 \& [% a | length %] \& \& [% b . lower %] .Ve .IP "\(bu" 4 Pipe \*(L"|\*(R" can be used anywhere dot \*(L".\*(R" can be and means to call the virtual method. (\s-1TT3\s0) .Sp .Vb 1 \& [% a = {size => "foo"} %][% a.size %] # = foo \& \& [% a = {size => "foo"} %][% a|size %] # = 1 (size of hash) .Ve .IP "\(bu" 4 Pipe \*(L"|\*(R" and \*(L".\*(R" can be mixed. (\s-1TT3\s0) .Sp .Vb 1 \& [% "aa" | repeat(2) . length %] # = 4 .Ve .IP "\(bu" 4 Added V2PIPE configuration item .Sp Restores the behavior of the pipe operator to be compatible with \s-1TT2.\s0 .Sp With V2PIPE = 1 .Sp .Vb 1 \& [% PROCESS a | repeat(2) %] # = value of block or file a repeated twice .Ve .Sp With V2PIPE = 0 (default) .Sp .Vb 1 \& [% PROCESS a | repeat(2) %] # = process block or file named a ~ a .Ve .IP "\(bu" 4 Added V2EQUALS configuration item .Sp Allows for turning off \s-1TT2 \s0\*(L"==\*(R" behavior. Defaults to 1 in \s-1TT\s0 syntaxes and to 0 in \s-1HT\s0 syntaxes. .Sp .Vb 2 \& [% CONFIG V2EQUALS => 1 %][% (\*(Aq7\*(Aq == \*(Aq7.0\*(Aq) || 0 %] \& [% CONFIG V2EQUALS => 0 %][% (\*(Aq7\*(Aq == \*(Aq7.0\*(Aq) || 0 %] .Ve .Sp Prints .Sp .Vb 2 \& 0 \& 1 .Ve .IP "\(bu" 4 Added \s-1AUTO_EVAL\s0 configuration item. .Sp Default false. If true, will automatically call eval filter on double quoted strings. .IP "\(bu" 4 Added \s-1SHOW_UNDEFINED_INTERP\s0 configuration item. .Sp Default false. If true, will leave in place interpolated values that weren't defined. You can then use the Velocity notation $!foo to not show these values. .IP "\(bu" 4 Added Virtual Object Namespaces. (\s-1TT3\s0) .Sp The Text, List, and Hash types give direct access to virtual methods. .Sp .Vb 1 \& [% a = "foobar" %][% Text.length(a) %] # = 6 \& \& [% a = [1 .. 10] %][% List.size(a) %] # = 10 \& \& [% a = {a=>"A", b=>"B"} ; Hash.size(a) %] = 2 \& \& [% foo = {a => 1, b => 2} \& | Hash.keys \& | List.join(", ") %] # = a, b .Ve .IP "\(bu" 4 Added \*(L"fmt\*(R" scalar, list, and hash virtual methods. .Sp .Vb 1 \& [% list.fmt("%s", ", ") %] \& \& [% hash.fmt("%s => %s", "\en") %] .Ve .IP "\(bu" 4 Added missing HTML::Template::Expr vmethods .Sp The following vmethods were added \- they correspond to the perl functions of the same name. .Sp .Vb 10 \& abs \& atan2 \& cos \& exp \& hex \& lc \& log \& oct \& sin \& sprintf \& sqrt \& srand \& uc .Ve .IP "\(bu" 4 Allow all Scalar vmethods to behave as top level functions. .Sp .Vb 1 \& [% sprintf("%d %d", 7, 8) %] # = "7 8" .Ve .Sp The following are equivalent in Alloy: .Sp .Vb 2 \& [% "abc".length %] \& [% length("abc") %] .Ve .Sp This feature may be disabling by setting the \&\s-1VMETHOD_FUNCTIONS\s0 configuration item to 0. .Sp This is similar to how HTML::Template::Expr operates, but now you can use this functionality in \s-1TT\s0 templates as well. .IP "\(bu" 4 Whitespace is less meaningful. (\s-1TT3\s0) .Sp .Vb 1 \& [% 2\-1 %] # = 1 (fails in TT2) .Ve .IP "\(bu" 4 Added pow operator. .Sp .Vb 1 \& [% 2 ** 3 %] [% 2 pow 3 %] # = 8 8 .Ve .IP "\(bu" 4 Added string comparison operators (gt ge lt le cmp) .Sp .Vb 1 \& [% IF "a" lt "b" %]a is less[% END %] .Ve .IP "\(bu" 4 Added numeric comparison operator (<=>) .Sp This can be used to make up for the fact that \s-1TT2\s0 made == the same as eq (which will hopefully change \- use eq when you mean eq). .Sp .Vb 1 \& [% IF ! (a <=> b) %]a == b[% END %] \& \& [% IF (a <=> b) %]a != b[% END %] .Ve .IP "\(bu" 4 Added self modifiers (+=, \-=, *=, /=, %=, **=, ~=). (\s-1TT3\s0) .Sp .Vb 2 \& [% a = 2; a *= 3 ; a %] # = 6 \& [% a = 2; (a *= 3) ; a %] # = 66 .Ve .IP "\(bu" 4 Added pre and post increment and decrement (++ \-\-). (\s-1TT3\s0) .Sp .Vb 2 \& [% ++a ; ++a %] # = 12 \& [% a\-\- ; a\-\- %] # = 0\-1 .Ve .IP "\(bu" 4 Added qw// contructor. (\s-1TT3\s0) .Sp .Vb 1 \& [% a = qw(a b c); a.1 %] # = b \& \& [% qw/a b c/.2 %] # = c .Ve .IP "\(bu" 4 Added regex contructor. (\s-1TT3\s0) .Sp .Vb 1 \& [% "FOO".match(/(foo)/i).0 %] # = FOO \& \& [% a = /(foo)/i; "FOO".match(a).0 %] # = FOO .Ve .IP "\(bu" 4 Allow for scientific notation. (\s-1TT3\s0) .Sp .Vb 1 \& [% a = 1.2e\-20 %] \& \& [% 123.fmt(\*(Aq%.3e\*(Aq) %] # = 1.230e+02 .Ve .IP "\(bu" 4 Allow for hexadecimal input. (\s-1TT3\s0) .Sp .Vb 1 \& [% a = 0xff0000 %][% a %] # = 16711680 \& \& [% a = 0xff2 / 0xd; a.fmt(\*(Aq%x\*(Aq) %] # = 13a .Ve .IP "\(bu" 4 \&\s-1FOREACH\s0 variables can be nested. .Sp .Vb 1 \& [% FOREACH f.b = [1..10] ; f.b ; END %] .Ve .Sp Note that nested variables are subject to scoping issues. f.b will not be reset to its value before the \s-1FOREACH.\s0 .IP "\(bu" 4 Post operative directives can be nested. (\s-1TT3\s0) .Sp Andy Wardley calls this side-by-side effect notation. .Sp .Vb 1 \& [% one IF two IF three %] \& \& same as \& \& [% IF three %][% IF two %][% one %][% END %][% END %] \& \& \& [% a = [[1..3], [5..7]] %][% i FOREACH i = j FOREACH j = a %] # = 123567 .Ve .IP "\(bu" 4 Semi-colons on directives in the same tag are optional. (\s-1TT3\s0) .Sp .Vb 3 \& [% SET a = 1 \& GET a \& %] \& \& [% FOREACH i = [1 .. 10] \& i \& END %] .Ve .Sp Note: a semi-colon is still required in front of any block directive that can be used as a post-operative directive. .Sp .Vb 2 \& [% 1 IF 0 \& 2 %] # prints 2 \& \& [% 1; IF 0 \& 2 \& END %] # prints 1 .Ve .Sp Note2: This behavior can be disabled by setting the \s-1SEMICOLONS\s0 configuration item to a true value. If \s-1SEMICOLONS\s0 is true, then a \s-1SEMICOLON\s0 must be set after any directive that isn't followed by a post-operative directive. .IP "\(bu" 4 \&\s-1CATCH\s0 blocks can be empty. .Sp \&\s-1TT2\s0 requires them to contain something. .IP "\(bu" 4 Added a \s-1DUMP\s0 directive. .Sp Used for Data::Dumper'ing the passed variable or expression. .Sp .Vb 1 \& [% DUMP a.a %] .Ve .IP "\(bu" 4 Added \s-1CONFIG\s0 directive. .Sp .Vb 4 \& [% CONFIG \& ANYCASE => 1 \& PRE_CHOMP => \*(Aq\-\*(Aq \& %] .Ve .IP "\(bu" 4 Configuration options can use lowercase names instead of the all uppercase names that \s-1TT2\s0 uses. .Sp .Vb 4 \& my $t = Template::Alloy\->new({ \& anycase => 1, \& interpolate => 1, \& }); .Ve .IP "\(bu" 4 Added \s-1LOOP\s0 directive (works the same as \s-1LOOP\s0 in HTML::Template. .Sp .Vb 4 \& [%\- var = [{key => \*(Aqa\*(Aq}, {key => \*(Aqb\*(Aq}] %] \& [%\- LOOP var %] \& ([% key %]) \& [%\- END %] \& \& Prints \& \& (a) \& (b) .Ve .IP "\(bu" 4 Alloy can parse HTML::Template and HTML::Template::Expr documents as well as \s-1TT2\s0 and \s-1TT3\s0 documents. .IP "\(bu" 4 Added \s-1SYNTAX\s0 configuration. The \s-1SYNTAX\s0 configuration can be used to change what template syntax will be used for parsing included templates or eval'ed strings. .Sp .Vb 3 \& [% CONFIG SYNTAX => \*(Aqhte\*(Aq %] \& [% var = \*(Aq\*(Aq %] \& [% var | eval %] .Ve .IP "\(bu" 4 Added @() and $() and \s-1CALL_CONTEXT. \s0 Template::Toolkit uses a \&\econcept that Alloy refers to as \*(L"smart\*(R" context. All function calls or method calls of variables in Template::Toolkit are made in list context. If one item is in the list, it is returned. If two or more items are returned \- it returns an arrayref. This \&\*(L"does the right thing\*(R" most of the time \- but can cause confusion in some cases and is difficult to work around without writing wrappers for the functions or methods in Perl. .Sp Alloy has introduced the \s-1CALL_CONTEXT\s0 configuration item which defaults to \*(L"smart,\*(R" but can also be set to \*(L"list\*(R" or \*(L"item.\*(R" List context will always return an arrayref from called functions and methods and will call in list context. Item context will always call in item (scalar) context and will return one item. .Sp The @() and $() operators allow for functions embedded inside to use list and item context (respectively). They are modeled after the corresponding Perl 6 context specifiers. See the Template::Alloy::Operators perldoc and \s-1CALL_CONTEXT\s0 configuration documentation for more information. .Sp .Vb 1 \& [% array = @( this.get_rows ) %] \& \& [% item = $( this.get_something ) %] .Ve .IP "\(bu" 4 Added \->() \s-1MACRO\s0 operator. .Sp The \->() operator behaves similarly to the \s-1MACRO\s0 directive, but can be used to pass functions to map, grep, and sort vmethods. .Sp .Vb 2 \& [% MACRO foo(n) BLOCK %]Say [% n %][% END %] \& [% foo = \->(n){ "Say $n" } %] \& \& [% [0..10].grep(\->(this % 2)).join %] prints 3 5 7 9 \& [% [\*(Aqa\*(Aq .. \*(Aqc\*(Aq].map(\->(a){ a.upper }).join %] prints A B C \& [% [1,2,3].sort(\->(a,b){ b <=> a }).join %] prints 3 2 1 .Ve .IP "\(bu" 4 The \s-1RETURN\s0 directive can take a variable or expression as a return value. Their are also \*(L"return\*(R" list, item, and hash vmethods. Return will also return from an enclosing \s-1MACRO.\s0 .Sp .Vb 1 \& [% a = \->(n){ [1..n].return } %] .Ve .IP "\(bu" 4 Alloy does not generate Perl code. .Sp It generates an \*(L"opcode\*(R" tree. The opcode tree is an arrayref of scalars and array refs nested as deeply as possible. This \*(L"simple\*(R" structure could be shared \s-1TT\s0 implementations in other languages via \s-1JSON\s0 or \s-1YAML. \s0 You can optionally enable generating Perl code by setting \s-1COMPILE_PERL\s0 = 1. .IP "\(bu" 4 Alloy uses storable for its compiled templates. .Sp If \s-1EVAL_PERL\s0 is off, Alloy will not eval_string on \s-1ANY\s0 piece of information. .IP "\(bu" 4 There is eval_filter and \s-1MACRO\s0 recursion protection .Sp You can control the nested nature of eval_filter and \s-1MACRO\s0 recursion using the \s-1MAX_EVAL_RECURSE\s0 and \s-1MAX_MACRO_RECURSE\s0 configuration items. .IP "\(bu" 4 There is no context. .Sp Alloy provides a context object that mimics the Template::Context interface for use by some \s-1TT\s0 filters, eval perl blocks, views, and plugins. .IP "\(bu" 4 There is no provider. .Sp Alloy uses the load_template method to get and cache templates. .IP "\(bu" 4 There is no parser/grammar. .Sp Alloy has its own built-in recursive regex based parser and grammar system. .Sp Alloy can actually be substituted in place of the native Template::Parser and Template::Grammar in \s-1TT\s0 by using the Template::Parser::Alloy module. This module uses the output of parse_tree to generate a \s-1TT\s0 style compiled perl document. .IP "\(bu" 4 The \s-1DEBUG\s0 directive is more limited. .Sp It only understands \s-1DEBUG_DIRS \\fIs0\fR\|(8) and \s-1DEBUG_UNDEF \\fIs0\fR\|(2). .IP "\(bu" 4 Alloy has better line information .Sp When debug dirs is on, directives on different lines separated by colons show the line they are on rather than a general line range. .Sp Parse errors actually know what line and character they occurred at. .SH "UNSUPPORTED TT2 CONFIGURATION" .IX Header "UNSUPPORTED TT2 CONFIGURATION" .IP "\s-1LOAD_TEMPLATES\s0" 4 .IX Item "LOAD_TEMPLATES" Template::Alloy has its own mechanism for loading and storing compiled templates. \s-1TT\s0 would use a Template::Provider that would return a Template::Document. The closest thing in Template::Alloy is the load_template method. There is no immediate plan to support the \s-1TT\s0 behavior. .IP "\s-1LOAD_PLUGINS\s0" 4 .IX Item "LOAD_PLUGINS" Template::Alloy uses its own mechanism for loading plugins. \s-1TT\s0 would use a Template::Plugins object to load plugins requested via the \s-1USE\s0 directive. The functionality for doing this in Template::Alloy is contained in the list_plugins method and the play_USE method. There is no immediate plan to support the \s-1TT\s0 behavior. .Sp Full support is offered for the \s-1PLUGINS\s0 and \s-1LOAD_PERL\s0 configuration items. .Sp Also note that Template::Alloy only has native support for the Iterator plugin. Any of the other plugins requested will need to provided by installing Template::Toolkit or the appropriate plugin module. .IP "\s-1LOAD_FILTERS\s0" 4 .IX Item "LOAD_FILTERS" Template::Alloy uses its own mechanism for loading filters. \s-1TT\s0 would use the Template::Filters object to load filters requested via the \&\s-1FILTER\s0 directive. The functionality for doing this in Template::Alloy is contained in the list_filters method and the play_expr method. .Sp Full support is offered for the \s-1FILTERS\s0 configuration item. .IP "\s-1TOLERANT\s0" 4 .IX Item "TOLERANT" This option is used by the \s-1LOAD_TEMPLATES\s0 and \s-1LOAD_PLUGINS\s0 options and is not applicable in Template::Alloy. .IP "\s-1SERVICE\s0" 4 .IX Item "SERVICE" Template::Alloy has no concept of service (theoretically the Template::Alloy is the \*(L"service\*(R"). .IP "\s-1CONTEXT\s0" 4 .IX Item "CONTEXT" Template::Alloy provides its own pseudo context object to plugins, filters, and perl blocks. The Template::Alloy model doesn't really allow for a separate context. Template::Alloy \s-1IS\s0 the context. .IP "\s-1PARSER\s0" 4 .IX Item "PARSER" Template::Alloy has its own built in parser. The closest similarity is the parse_tree method. The output of parse_tree is an optree that is later run by execute_tree. Alloy provides a backend to the Template::Parser::Alloy module which can be used to replace the default parser when using the standard Template::Toolkit library. .IP "\s-1GRAMMAR\s0" 4 .IX Item "GRAMMAR" Template::Alloy maintains its own grammar. The grammar is defined in the parse_tree method and the callbacks listed in the global \&\f(CW$Template::Alloy::Parse::DIRECTIVES\fR hashref. .SH "AUTHOR" .IX Header "AUTHOR" Paul Seamons .SH "LICENSE" .IX Header "LICENSE" This module may be distributed under the same terms as Perl itself.