From d0add2a7369e74866230820010f68cfad98162b9 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 10 Apr 2012 17:47:35 -0400 Subject: [PATCH] TT conditionals and loops. Basic stuff. Signed-off-by: Dan Scott --- eg2012_tpac.txt | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/eg2012_tpac.txt b/eg2012_tpac.txt index 1427673c2..48b6317dd 100644 --- a/eg2012_tpac.txt +++ b/eg2012_tpac.txt @@ -53,7 +53,8 @@ TT Syntax - Blocks * `[%` starts a TT block; `%]` ends a block * `[%-` starts a block and gobbles up the preceding whitespace and newline * `-%]` ends a block and gobbles up the subsequent whitespace and newline - * Use as much whitespace as you like within a block; output is unaffected + * Use as much whitespace as you like within a block; output is unaffected. + * Delimit multiple statements in a single block with a semicolon [source, html] ------------------------------------------------------------------------------ @@ -90,6 +91,30 @@ my $martini = {

Give me an olive!

------------------------------------------------------------------------------ +TT Syntax - Conditionals and Loops +---------------------------------- + +(All structures end with an `END` block) + + * `IF` / `UNLESS` / `ELSE` / `ELSIF` + * `FOREACH`, `WHILE` + +.TT variable +[source, html] +------------------------------------------------------------------------------ + + + +------------------------------------------------------------------------------ Common customizations - styles ------------------------------ -- 2.11.0